|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
DAP ComboBox does not immediately refresh
Hi. This is a vbScript question
In my Data Access Page, I have a a combo box from which the user can select a specific record to view based on the value SupervisorManagerName. My combo box works fine in that respect. The user clicks on a name in the combo box, and the record is populated with the correct record. When I add a *new* record, however, the combo box does not refresh immediately to include the new SupervisorManagerName in its list. Once I close the DAP and then reopen it, the new SupervisorManagerName is included in the combo box, and I can select the name to pull up the record. Any suggestions on how to get the combo box to refresh immediately upon adding/saving a new record without having to actually close and then reopen the page? I am able to make this process work using VBA and a regular Access page, but can't figure out how to do this using vbScript ![]() If this helps, I'm including the VBA code that works in Access. I can't figure out how to convert this to vbScript and my Data Access Page. Thank you soooooooooo much for any suggestions. It's driving me crazy ![]() VBA version General Module: Public Function IsOpen(ByVal FormName As String) As Boolean 'returns True if the specified form is open in Form view Const DesignView = 0 Const ObjStateClosed = 0 IsOpen = False If SysCmd(acSysCmdGetObjectState, acForm, FormName) <>_ ObjStateClosed Then If Forms(FormName).CurrentView <> DesignView Then IsOpen = True End If End If End Function Code from Form: Private Sub Form_AfterUpdate() 'Refresh the form to immediately reflect additions, deletions or changes 'Using the Refresh & Requery methods and calling the IsOpen user-defined function found in the General module If IsOpen("SupervisorManager") Then Forms!SupervisorManager.Refresh End If If IsOpen("SupervisorManager") Then 'refresh form to show the value in the 'supervisormanager TEXT box Forms!SupervisorManager.Requery End If End Sub Any suggestions on how to make this work in vbScript for a Data Access Page? Again, thank you very very much. |
|
#2
|
||||
|
||||
|
Moved to the ASP forum from Scripts.
kk057, The 'Scripts' forum is a language-agnostic forum where users can request advice as to already-coded scripts that they can download & use for a specific purpose. Language specific questions should be posted to their appropriate forums. I hope this alleviates any confusion you may have. Thanks.
__________________
Give a person code, and they'll hack for a day; Teach them how to code, and they'll hack forever. Analyze twice; hack once. The world's first existential ITIL question: If a change is released into production without a ticket to track it, was it actually released? About DrGroove: ITIL-Certified IT Process Engineer - Enterprise Application Architect - Freelance IT Journalist - Devshed Moderator - Funk Bassist Extraordinaire |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > DAP ComboBox does not immediately refresh |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|