Jay said:
So if my Form is based on the table there's no way, is that correct?
No, that's not correct. But it would involve using code or macro to
change the form's Record Source when you enter something in the combobox.
Am I right in thinking I'd have to set up an all fields & records query,
base the form on that, & then add the combo box with an AfterUpdate event
which opens a query which is the same as the query on which the form is
based , but with the Combo Box specified in the criteria of the StaffName
field?
Pretty much. But you wouldn't open the query. The form will be based
on the query, so the form will show the records that the query returns,
so opening the query is not applicable. But you would need to put code
on the Combobox's After Update event, like this...
Me.Requery
As for "the Combo Box specified in the criteria of the StaffName field",
well this would normally be in the criteria of a unique identifier
field, such as StaffID. StaffName sounds like the name of the staff
member, which is something you can't guarantee you won't have two of in
the database. Also, you would specify the criteria like this...
[Forms]![NameOfForm]![NameOfCombobox] Or
[Forms]![NameOfForm]![NameOfCombobox] Is Null
This is so you can clear the combobox, and see all records again.
There are all sorts of other ways to do this, for example using the
Filter property of the form, and this is not too hard, but the approach
I have suggested is probably the simplest and least code.\