Nov 11 2010, 04:37 PM
I have form1 opening form2. On form 2, I enter some data. When I'm done on form2, I want form2 to stay open but set the focus back to form1. When I'm done using form2, I will then close form2. On form2, I have a button that simply tries to set the focus back to form1 using forms!form1!setfocus and I have tried setting focus to a control on form1 using forms!form1!mybutton!setfocus but neither is working so I know I am doing something wrong. Can anybody help me with the syntax?
Thanks in advance
Nov 11 2010, 04:43 PM
That is the code you're using to open form2 from form1? By any chance are you using the acDialog argument?
Nov 11 2010, 04:51 PM
I am using .... DoCmd.OpenForm "form4", acNormal
Nov 11 2010, 04:53 PM
see. So, if this is your actual syntax:
then try replacing the bang with a dot:
Hope that helps...
Nov 11 2010, 05:36 PM
HAs usual, you come through again! I just needed to shake the leaves out of the trees a little.
Nov 11 2010, 05:41 PM
Glad to hear it worked out for you. Good luck with your project.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here