RunCommand acCmdFind not working

J

James

Hi,

I have an Access 97 app converted to Access 2002. The app
uses workgroups to hide the Menu bar for standard users.
To allow user to use the Find command each form contains a
Find button, which opens the Find dialog.

However, when you search the focus is set to the find
button so I get - The control 'btnFindRecord' the macro is
attempting to search can't be searched.

I've tried using the old Access command :
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, ,
acMenVer70

And the new command:
DoCmd.RunCommand acCmdFind

And both have the same effect.

Any suggestions?
Thanks
 
M

M.L. Sco Scofield

Try adding Screen.PreviousControl.SetFocus to your code.

Good luck.

Sco

M.L. "Sco" Scofield, Microsoft Access MVP, MCSD, MCP, MSS, A+
Useful Metric Conversion #17 of 19: 1 billion billion picolos = 1 gigolo
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 

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