Modifying Command Button

Y

yassoon

I'd like to add a command buttons so that each one is dedicated to Find in a
specific data field, eg a button to search for last name, another to search
for company name. And so there'd be a macros for each button. How do I
modify the script so that it goes to a specific field? Below is the default
script. If someone could tell me what and where I need to add to the script,
that would be great. Thanks

MsgBox Err.Description
Resume Exit_FindName_Click

End Sub
Private Sub FindCompany_Click()
On Error GoTo Err_FindCompany_Click


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

Exit_FindCompany_Click:
Exit Sub

Err_FindCompany_Click:
MsgBox Err.Description
Resume Exit_FindCompany_Click

End Sub
 
M

Mike Painter

I'd like to add a command buttons so that each one is dedicated to
Why would you want to use a button when a combobox will do this in a better
manner?
 

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

Similar Threads


Top