A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Filter in the form



 
 
Thread Tools Display Modes
  #1  
Old April 10th, 2010, 07:48 AM posted to microsoft.public.access.forms
samotek via AccessMonster.com
external usenet poster
 
Posts: 29
Default Filter in the form

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?

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201004/1

  #2  
Old April 10th, 2010, 10:25 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default Filter in the form

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

"samotek via AccessMonster.com" u15330@uwe wrote in message
news:a64f40cdd3e99@uwe...
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?

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201004/1



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.