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

Search Function - Set Default Values

Status
Not open for further replies.

tyleri

Programmer
Jan 2, 2001
173
US
I am using the "wizard" code that was inserted in the form's module for the "SEARCH" function of a form.

here is the code:

Private Sub Search_But_Click()
On Error GoTo Err_Search_But_Click

Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

Exit_Search_But_Click:
Exit Sub

Err_Search_But_Click:
MsgBox Err.Description
Resume Exit_Search_But_Click

End Sub

I want to set 2 default values in this search box that comes standard with Access 97. I want the section that says "Match: Whole Field" to be set at "Any part of Field" initially, and also the CHECKBOX that is checked for "Search Only Current Field" to be UNCHECKED when it is initially opened. My users get confused easily and don't understand what these options mean, so I need to have it this way so they don't get upset when a record "is not present" because they're searching the wrong field or whatnot. Thanks in advance!!!

 
then you're going to have to do it the real way (in vb code)

first set a filter
then apply the filter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top