G
Guest
I have a combo box ,cboLocations, where the rowsource is only active
locations, qryActiveLocations. I want to be able to use a checkbox to set the
rowsource of cboLocations to either active locations only
(qryActiveLocations) or all Locations (tblLocationNames). What I've tried to
do is is use an If Then statement in the cboLocations On Click event to set
the rowsource, but then cboLocations is empty when I click in it.
Private Sub cboLocation_Click()
If chkActive = True Then
Me.cboLocation.RowSource = qryActiveLocationstest
Me.cboLocation.Requery
Else:
Me.cboLocation.RowSource = tblLocationNames
Me.cboLocation.Requery
End If
End Sub
What am I doing wrong? Thanks for any help.
locations, qryActiveLocations. I want to be able to use a checkbox to set the
rowsource of cboLocations to either active locations only
(qryActiveLocations) or all Locations (tblLocationNames). What I've tried to
do is is use an If Then statement in the cboLocations On Click event to set
the rowsource, but then cboLocations is empty when I click in it.
Private Sub cboLocation_Click()
If chkActive = True Then
Me.cboLocation.RowSource = qryActiveLocationstest
Me.cboLocation.Requery
Else:
Me.cboLocation.RowSource = tblLocationNames
Me.cboLocation.Requery
End If
End Sub
What am I doing wrong? Thanks for any help.