Disable Form 'On Current' Event during Sub

mab9

Registered User.
Local time
Today, 14:31
Joined
Oct 25, 2006
Messages
63
In a particular updating subroutine that is based off a form's recordset, its getting really slowed down due to having:

Code:
Private Sub Form_Current()
    Me.cb_pogdbkey.Requery
End Sub

Is there a way to disable the on current event, run my sub & then re-enable it?
 
Hum... Would it make more sense to disable, etc the requery line in your code?

???
ken
 
Why do you need to refresh the data in the combobox so often? If the combobox is driven by a field on your form and used to search, then us the afterupdate event of the field to save and refresh.
 
The form pulls in multiple records into its detail section. For each record, a combo box is used to select other data. Unfortunately, the "list" available to each record via the combo box and is driven by the On Current refresh. I've tried putting this line just about everywhere else (before update, after update, on Enter, Exit, etc), but none of them works as intended. Having the refresh in the On Current, its requerying the combo box list as it should be.


Edit:
Got it working:

Code:
Forms("qry_load_branch").OnCurrent = ""
'SUB
Forms("qry_load_branch").OnCurrent = "Form_Current"
 
Last edited:

Users who are viewing this thread

Back
Top Bottom