Filter in the form

  • Thread starter samotek via AccessMonster.com
  • Start date
S

samotek via AccessMonster.com

In my tabular form i have a field called supplierid.I want to build a button
on my form with the following alternatives:
1. show only the fields with supplierid = 1
2. show only the fields with supplierid = 2
3. show all

whixh is the best method to do it?
 
J

Jeanette Cunningham

If you use a combobox instead of a button, it will still work if you get
another supplierid.
The combo row source can be a query based on the supplierid table.
Use a union query to get the option for all.


Select tblSupplier.SupplierID, tblSupplier.SupplierName
From tblSupplier
Union Select Null As SupplierID, "<All" As SupplierName
Order By SupplierName

If you use the combo wizard to make the combo, choose the option to find a
record.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top