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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I create a Command button?

Status
Not open for further replies.

assgoblin

Technical User
Sep 25, 2003
3
US
This is a simple question...how do I create a command button for a FORM that performs a FILTER BY FORM operation?

Thanks I truly appreciate everyones help on this site.
 
There is a Form Wizard option which runs the actual Filter by Form. If you want to actually open up the screen where you input the filter criteria, this should do that when put into the OnClick event of a button:

DoCmd.RunCommand acCmdFilterByForm

Or have i misunderstood the question (a fairly frequent occurance)?

James.


 
Through help from the forum, I created a command button to "Filter By Form" which basically clears the form in order to select criteria into the empty fields.
Private Sub <Name of your button>_Click()
DoCmd.RunCommand acCmdFilterByForm
DoCmd.RunCommand acCmdClearGrid
End Sub
....However, another command button I created to &quot;Apply Filter&quot; becomes unavailable after selecting the criteria. This 2nd button was created with help from the wizard. Do I need to create an event procedure by using the code builder instead of using the wizard in this situation? Furthermore, what is the vb code to apply the filter? Any info is much appreciated...thanks in advance!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top