Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change focus to report from form code

Status
Not open for further replies.

blueangel76

Technical User
Feb 15, 2007
11
US
I'm sure this is something very simple, but for the life of me, I cannot figure it out. What happens is that when a user wants to run a report, they are first prompted, through a form for data. Within the form, code is run that updates a table that will populate the report. The report will stay open, but minimized while this code is running. How do I, after the update is finished, have the report display on top?

Thanks,
Angie
 
Code:
docmd.OpenReport("<your_report_name>")

This will activate the minimized report and refresh the data.

TMTOWDI - it's not just for Perl any more
 
So, this will work if the report is already opened, but minimized?
 
Yep. I checked. :)

TMTOWDI - it's not just for Perl any more
 
Thanks! I tried it. It worked, but it printed the report right away. That should be fine when this is all finished, but when I am in the design/testing phase, how do I keep it from printing automatically? I have never seen this happen before.
 
docmd.OpenReport "<your_report_name>", acViewPreview


TMTOWDI - it's not just for Perl any more
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top