I have a combo box uses it's after update value to filter a subform. this works fine but my problem is:
When the value in my combo box does not have an attached record (yet) the subform returns all records with the first combo box's value.
I would like for it to return NO records.
My other problem, that is probably linked, is that even before a combo box value is chosen and no records should be filtered, the subform is already filtered for the combo box's first value.
my code: (used the access auto combo filter)
Private Sub Combo0_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[LLineNo] = '" & Me![Combo0] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
I basically need some code that says ' when form is opened show all records '
and ' if me!Combo0 = no records, then return nothing '
Any help would be greatly appreciated
Many Thanks, JamieW
When the value in my combo box does not have an attached record (yet) the subform returns all records with the first combo box's value.
I would like for it to return NO records.
My other problem, that is probably linked, is that even before a combo box value is chosen and no records should be filtered, the subform is already filtered for the combo box's first value.
my code: (used the access auto combo filter)
Private Sub Combo0_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[LLineNo] = '" & Me![Combo0] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
I basically need some code that says ' when form is opened show all records '
and ' if me!Combo0 = no records, then return nothing '
Any help would be greatly appreciated
Many Thanks, JamieW