We help IT Professionals succeed at work.

Set Focus on form On Load by using a Macro

pdvsa
pdvsa asked
on
Hello, how do I do this in a macro?  I have looked and not sure if I can set focus through use of a Macro.  I know I can by VBA but I need to do it by macro.

Me.Project_Name.SetFocus

thanks
Comment
Watch Question

GoToControl action
pdvsaProject finance

Author

Commented:
Do you think this is correct?  I have some other items in the Macro and not sure if I can combine like I am doing.  It does not set focus the way it is not in the pic.  

Let me know what you think.  thx
untitled.JPG
pdvsaProject finance

Author

Commented:
the name of the field is [Project Name]  there is a space...
pdvsaProject finance

Author

Commented:
I have the macro ON LOAD event.  
The GoToControl appears to be the first step in your macro but steps that happen after that may cause the control to lose focus again
pdvsaProject finance

Author

Commented:
It might be because I have a tab on the form and the setfocus field is on that tab.  I might need to reference the tab name but not sure.  I will try that... Project Name field to set focus on tab