|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
DAP Combo Box does not immediately refresh
Hi. In my DAP, 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/DAP? Again, thank you very very much. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > DAP Combo Box does not immediately refresh |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|