Full Version: Easy Question, modify a search button on form
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
mmishkin
I have a form that i've created a command button to search records, for some reason it is looking at a different field then I want it to. Here is what the VB says
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
How can I change it to look at last name? When it's selected it looks for Social. I know you can change the search just clicking in the field you want it to search but, but I would like it to default to name.
AQM_UK
Create a new control.
se the combo box wizard and the thrid option is to find.
Use that, that should work for you.
Jim
mmishkin
I think we may be talking different versions, I'm in 2002.
When I do the combo box wizard, there are no options about "find"
I just get a combo box with all the names in it.
manrav1
Try this
Me.Last_name.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
mmishkin
Worked like a charm! Thank you!!!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.