Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter by Form on a button rather than forcing users to the toolbar

Status
Not open for further replies.

MarkRobinson

Programmer
Feb 18, 2000
112
US
I've re-posted this in the hopes I can get further help.<br><br>MarkRobinson (Programmer) Jun 14, 2000 <br>I'd like to take more control of the filter-by-form by putting buttons on the form for &quot;filter&quot; & &quot;apply filter&quot; and customizing the filter-by-form data entry screen (changing the instructions text and color).<br>Any Ideas?&nbsp;&nbsp;<br><br>DougP (MIS) Jun 14, 2000 <br>well there are tool bar button wizards that do all of that and more.<br>&nbsp;<br>MarkRobinson (Programmer) Jun 14, 2000 <br>Thank you, I realize that. I would like to keep my users off the tool bar, though, and put buttons on my form that do everything they need to do.<br>... or are you saying that the tool bar button wizards will put the buttons I need on my form?&nbsp;&nbsp;<br><br><br>
 
how about <br>docmd.menuitem<br>Create buttons the do menu items. <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
sorry it's<br>DoCmd.DoMenuItem<br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Or you can create a Option group, in design view click on Option Group tool make sure the wizard is on type A&LL for all records next one type Whatever. Next you now have 1 All 2 Whatever, Next Save value for later use, Next default is fine, Next whatever you want.&nbsp;&nbsp;Now click the properties button on the toolbar, click other tab and name the property FilterOptions.<br><br>Now click on Events AfterUpdate and add the following code<br><br>If FilterOptions = 2 then<br>&nbsp;&nbsp;&nbsp;Me.Filter = &quot;Field name here&quot; = 'whatever here'<br>&nbsp;&nbsp;&nbsp;Me.FilterOn = true&nbsp;&nbsp;&nbsp;&nbsp;'apply the filter<br>else<br>&nbsp;&nbsp;&nbsp;Me.FilterOn = False&nbsp;&nbsp;&nbsp;'remove the filter<br>End If<br><br>Just a little more<br>In design view Switch to VB and select Form and ApplyFilter from the drop down list and add this code<br><br>If ApplyType = acShowAllRecords then<br>&nbsp;&nbsp;&nbsp;FilterOptions = 1<br>ElseIF Filter &lt;&gt; &quot;Field name here = 'whatever here'&quot; then<br>&nbsp;&nbsp;&nbsp;FilterOptions = Null<br>End If<br><br><br>Good Luck<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top