I have a table of 100 staff, I have added a filter on the form, ie users select name (from a unbound combo box) and is able to scroll through all records for that name. If no records have been created for MrA and you select that name in the filter I get a runtime error,
What do I need to add to my
VB that will cancel the error and state –No Records held for that name then revert bank to showing all records
Private Sub CoName_AfterUpdate()
If IsNull(Me.CoName) Then
Me.FilterOn = False
Else
Me.Filter = "StafflName = """ & Me.CoName & """"
Me.FilterOn = True
Me.subfrm_frm_OpenActions.Form.Filter = "[StaffName] = " & Chr(34) & Me.CoName & Chr(34)
End If
End Sub