Ok, the problem is not that I plan on using setfocus at all, but this
This is in the Report_Open module that I am running. Essentially, in the Open module, it checks to see if the info has been entered correctly and instead of using the default Access msgbox to enter parameters (which many do not understand) it redirects them to a form where they can enter all of the information.
The above should execute, but I am thinking that I am having a problem with the fact that it is executing before the Open module is done executing therefore resulting in the Form not being the one showing, but the current report with no info on it shows.
I have also tried (and prefered to use)
but I am running into an error where it won't execute when print preview is clicked with an error message that standard error trapping won't seem to move past (i.e., On Error Resume Next). Maybe I have the code wrong since it is not in a loop and an easier fix than I think.
Any help is appreciated greatly appreciated!
Code:
DoCmd.SelectObject acForm, "Metrics Date Range", False
This is in the Report_Open module that I am running. Essentially, in the Open module, it checks to see if the info has been entered correctly and instead of using the default Access msgbox to enter parameters (which many do not understand) it redirects them to a form where they can enter all of the information.
The above should execute, but I am thinking that I am having a problem with the fact that it is executing before the Open module is done executing therefore resulting in the Form not being the one showing, but the current report with no info on it shows.
I have also tried (and prefered to use)
Code:
DoCmd.Close acReport, "Metrics Reporting"
Any help is appreciated greatly appreciated!