need help with filtering. help!!

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

Ive gota form where I can select something from that listbox. lets say
CARMAKE

I then have a Show models button that should open a form display all models
for the selected make.

What I have done is I created a subform, thats the form that opens on
click. But whenever I go there it does not take what I selected in the
listbox on the previous form, it displays all the models in the table and
is not filtered for make.

Lets say my tables are called.
CARMAKE
CARMODEL

Forms are called Makes, and Models

was thinking docmd.openform "Models" ,,,
But I have no idea what to do for the where condition.

Anyone out there able to help?
 
Well hopefully you have a field in your CARMODEL table which relates to your
CARMAKE table. If so, then the syntax for getting the Models form to display
the filtered records would be:

docmd.openform "Models" ,,, "[CARMAKE]=" & Me.CARMAKE

'[CARMAKE]' would be the CARMODEL table's field name relating back to your
CARMAKE table
Me.CARMAKE would be the name of the control on your Makes form

HTH,
Brian
 
Back
Top