Find Record

G

Guest

Access makes if very easy to add a button to a form to find a record, but the
default is to match the "Whole Field". I would like to know how to configure
the "Find" form that pops up to default to match "Any Part of Field". Here
is the code that the wizard generates for the button:

Private Sub cmdFindSAR_Click()
On Error GoTo Err_cmdFindSAR_Click

Screen.PreviousControl.SetFocus

DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

Exit_cmdFindSAR_Click:
Exit Sub

Err_cmdFindSAR_Click:
MsgBox Err.Description
Resume Exit_cmdFindSAR_Click

End Sub

I appreciate any help you can give me.
Judy
 
G

Guest

I was really hoping this would work. I found the screen you described and
could see a choice of: Fast search, General search and Start of field search.
I tried both General search and Start of field search. I made sure to click
"Apply" and "OK". But when I click on my command button, the "Find and
Replace" popup window still only shows Match: Whole Field. I am using Access
2002.

Can you think of anything else I can try?

Thank you for your help,
Judy
 
A

Allen Browne

That should work, Judy.

Fast search = whole field.
General search = any part.
Start of field search = start.

I'm actually using A2003, but it works here.
 
G

Guest

I tried this twice to make sure. When I change the default value, the change
is not reflected when I use Find/Replace. If I close the database and open
it again, the new default takes affect.

Thank you very much for providing the solution.
Judy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top