Apply filter VD code - not working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In previous databases I've used the following:

Using a form (called frmEnquiryForm) I'm attempting to look up a table that
has peoples names and addresses:

In the table and placed on the form is a field "ID" which holds the names of
people

In the form, looking at this table, I've crated a combo box to select a
name, on the event "afterupdate" I've added the following:

Private Sub ComboSelect_AfterUpdate()

DoCmd.Applyfilter, "ID" = Forms!frmEnquiryForm!ComboSelect"

End Sub

So when the combo box is looked up, the rest of the form is populated

But for some reason.....it's not happening today

I've not used a database for maybe a year, am I missing something.....

Not really a VB user....just access
 
That should work, provided:
- the form is bound to the table that has the ID value;
- the combo is on the same form;
- the combo's bound column is a Number type field;
- you omit the final quote in your example;
- the current record on the form does not prevent it from moving (e.g. you
left a required field blank.)
 
Back
Top