Access 2010 ComboBox Requery Not Working
Posted on 2016-11-16
For some reason the following code does not cause the ComboBox to Requery. As a result the lookup field doesn't display any selections.
There query that is being run contains a Parameter previously selected on the form hence the need to requery so that only the subset of data specified by the Parameter is in the list in the ComboBox.
The 'DEBUG' Field contains the value of the Parameter so that I can see that it is populated and that it contains the correct data, which it does.
Private Sub F22500_LKUP_ORG_MEMBER_KEY_GotFocus()
On Error GoTo STEP_999
Dim DEBUG_F22500_PARM_PERIOD_ORG_KEY As String
DEBUG_F22500_PARM_PERIOD_ORG_KEY = F22500_PARM_PERIOD_ORG_KEY
'Step 990-Exit Event.
'Step 999-Form Error Handler Code.
Dim M00000_999 As Form
Set M00000_999 = [Forms]![M-00-000 - Scout Admin System - Main Menu]
Dim DEBUG_ERR_MSG_OPTION_999 As String
'DEBUG_ERR_MSG_OPTION_999 = "Yes" 'Un-Comment for use.
If M00000_999!LKUP_SYS_ERR_MSG_OPTION = "Yes" Or DEBUG_ERR_MSG_OPTION_999 = "Yes" Then
MsgBox Err.DESCRIPTION & " (" & Err.Number & ")"
Any ideas why this isn't working and/or is there a better way to do this?