Your form is based on a query and one of the fields has criteria that looks
like:
Forms!NameOfYourForm!NameOfYourCombobox
Change that criteria to:
Forms!NameOfYourForm!NameOfYourCombobox Or
(Forms!NameOfYourForm!NameOfYourCombobox Is Null)
The way I have it currently configured I'm not using any criteria in
my data query's.
My toplevel form is bound to the lnkFoo table, but doesn't display any
records from it directly. It has an unbound combobox ComboBar with
lkupBar as a rowsource. BarID is an FK in the lnkFoo table. Also in
the toplevel form is a subform control. It links BarID between the
child and master forms.
The child form inside the subform control has a query that gets the
contents of lnkFoo and several fields from additional tables via a
different FK in the table.
I'm applying the filter in the combobox AfterUpdate event.
The relevant snippet of code from the event is...
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[BarID] = " & Str(Nz(Me![ComboBar], 0)) & " AND
[BazID] = " & Str(Nz(Me![ComboBaz], 0))
'filter is set to match nothing. This is needed because if
there's no match the bookmark
'is set to both FKs = 1. I wasn't able to change it directly.
If rs.NoMatch Then
Me.ChildForm.Form.FilterOn = True
Else
Me.ChildForm.Form.FilterOn = False
Me.Bookmark = rs.Bookmark
End If
BazID and ComboBaz are a second FK and combo that are also being used
for filtering purposes.
I tried changing the FindFirst code to this, but if I backspace out
the selection in ComboBar the child form doesn't update the displayed
records.
rs.FindFirst "[BarID] = " & Str(Nz(Me![ComboBar], 0)) & "OR [BarID] =
NULL" & " AND [BazID] = " & Str(Nz(Me![ComboBaz], 0))