I am trying to filter records in a form using two combo boxes
with the following in the after update event of each:
If IsNull(Me.cboFilter1) And IsNull(Me.cboFilter2) Then
Me.FilterOn = False
Exit Sub
End If
If IsNull(Me.cboFilter2) Then
Me.Filter = "AreaID = " & Me.cboFilter1
Me.FilterOn = True
Else
Me.Filter = "AreaID = " & Me.cboFilter1 & _
" and EquipmentNameID = " & Me.cboFilter2
Me.FilterOn = True
Exit Sub
End If
However, when I select cboFilter1 my EquipmentNameID
field goes blank and I cannot figure out why? Does anyone
have any suggestions? The filter works fine, by the way,
just a blank box.
Rick Brandt - 23 May 2008 00:22 GMT
> I am trying to filter records in a form using two combo boxes
> with the following in the after update event of each:
[quoted text clipped - 18 lines]
> have any suggestions? The filter works fine, by the way,
> just a blank box.
If your form allows new records to be inserted then any filter that matches
zero rows will only show the new record position where any controls that
don't have default values will appear blank. My guess is that this is what
is happening.

Signature
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jan Baird - 27 May 2008 20:50 GMT
Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.