on doubleclick, change focus

eibyer_apc

New member
Local time
Today, 00:15
Joined
Mar 1, 2022
Messages
18
I have a form with a text box that displays query numbers. I have it set to open the query on double click and that works. I just want to change the focus after the double click event so that the text box is not selected, maybe shift focus on the main form?

This is after the double click event.
1649096302747.png
 
Have you tried setting the focus to a different control? You can either use DoCmd.GoToControl or Me.ControlName.SetFocus to do that.
 
That did it! Thank you. Just had to make sure to do the setfocus before my docmd.openquery.
 
That did it! Thank you. Just had to make sure to do the setfocus before my docmd.openquery.
Congratulations! Glad to hear you got it sorted out. Good luck with your project.
 
Noted. I'm the only user for now so I'm not worried about that part yet. If I get comfortable enough to create a project that involve other users then I would definitely try to avoid displaying the query and instead present a datasheet view form that actually makes more sense now that you pointed it out :)
 

Users who are viewing this thread

Back
Top Bottom