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

How to Open a Form in "Filter by Form" grid

Status
Not open for further replies.

chris3942

Technical User
Joined
Jul 2, 2003
Messages
17
Location
US
When choosing "Filter by Form" you are presented with a blank form (ala "grid") into which you can enter "search specs". I would like to open a form, have it automatically enter a "Filter by Form" mode with a 'cleared grid' ready for the user to input the "search specs". Any help will be appreciated.
 
Hi Dan,

Thanks for your help.Here's the "On Click" [Event Procedure] code I use to open the "SEW-UP PARTS" form:


Private Sub CB_Open_Sew_Up_Parts_Form_Click()
On Error GoTo Err_CB_Open_Sew_Up_Parts_Form_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "SEW-UP PARTS"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_CB_Open_Sew_Up_Parts_Form_Click:
Exit Sub

Err_CB_Open_Sew_Up_Parts_Form_Click:
MsgBox Err.Description
Resume Exit_CB_Open_Sew_Up_Parts_Form_Click

End Sub



Your reply to my help request on opening the form with a blank grid of a "Filter by Form" was:

Private Sub Form_Load()
DoCmd.RunCommand acCmdFilterByForm
End Sub



How do I incorporate your code into mine?

Chris

 
Open the form in Design View
Go to View-Properties
Find 'On Load'
Type [Event Procedure]
Click the 3 little dots.
Paste the line:
DoCmd.RunCommand acCmdFilterByForm
Open the form.


Good luck


[pipe]
Daniel Vlas
Systems Consultant

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top