jonathanchye
Registered User.
- Local time
- Today, 07:11
- Joined
- Mar 8, 2011
- Messages
- 448
I have a report which unfortunately has a lot of controls. It takes around 15 seconds to open in Print Preview.
What I'm trying to do is to open the report and set the visible property to false when the DB loads. When the user wants to print an order the report then finds the record and is visible again. On the report's "Unload" event I've added the code Cancel = true and Me.visible = false which keeps the report hidden even though the user clicks "Close" after print preview.
So far so good however I noticed the report will not change records if the user selects another order. I guess this is because I've initially loaded the report with a filter (docmd.openreport "Test",,,"ID = 1" for ex.)
I've tried reopening the report again but that won't work. The only way that seems to work is to call a sub in the report using Me.filter = "ID = xxx" Me.filteron = true but then it will take the same time "loading" again even though the report was already loaded but hidden.
Is there any solution for this? Bookmark, go to record etc doesn't seem to work for reports.
If I open the report first time without any filters the DB crashes as there's thousands of records...
What I'm trying to do is to open the report and set the visible property to false when the DB loads. When the user wants to print an order the report then finds the record and is visible again. On the report's "Unload" event I've added the code Cancel = true and Me.visible = false which keeps the report hidden even though the user clicks "Close" after print preview.
So far so good however I noticed the report will not change records if the user selects another order. I guess this is because I've initially loaded the report with a filter (docmd.openreport "Test",,,"ID = 1" for ex.)
I've tried reopening the report again but that won't work. The only way that seems to work is to call a sub in the report using Me.filter = "ID = xxx" Me.filteron = true but then it will take the same time "loading" again even though the report was already loaded but hidden.
Is there any solution for this? Bookmark, go to record etc doesn't seem to work for reports.
If I open the report first time without any filters the DB crashes as there's thousands of records...