VBA to set focus to a report on load

darkmastergyz

Registered User.
Local time
Yesterday, 16:13
Joined
May 7, 2006
Messages
85
How can you set focus to a report on load? Right now, once it loads it does not have focus. Thanks!!
 
Are you talking about the Preview of a report? What code are you using to open the report?
 
I've seen this, mostly in 2007, where hitting ctrl+p or the print button causes something else to print, or display over the report if you haven't "clicked" on the report first.

Due to the setup in that app (all forms opened with acDialog), I needed to make whatever else got the focus invisible again, then print the report.

To do that, I used the AutoKeys macro to trap Ctrl+p and created a function to be called from my custom print button and the AutoKeys macro.

If you need more assistance, please provide more info (perhaps attach a stripped version of the db to replicate the problem?).
 

Users who are viewing this thread

Back
Top Bottom