Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-28-2017, 12:00 PM   #31
Gasman
Enthusiastic Amateur
 
Gasman's Avatar
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 4,363
Thanks: 434
Thanked 802 Times in 777 Posts
Gasman is a jewel in the rough Gasman is a jewel in the rough Gasman is a jewel in the rough
Re: DoCmd.OpenReport Error

Quote:
Originally Posted by dvarvel View Post
PERFECT!! You are amazing!! Is there any way to make it go faster? lol The current report only has 975 rows... the next report will have over 50k. hahahahahah
Have you got an index on the State field?

__________________
Access novice. Sometimes trying to give something back.
Access 2007

Please, please use code tag # when posting code snippets

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Gasman is offline   Reply With Quote
The Following User Says Thank You to Gasman For This Useful Post:
dvarvel (11-28-2017)
Old 11-28-2017, 12:02 PM   #32
dvarvel
Newly Registered User
 
Join Date: Nov 2017
Posts: 22
Thanks: 9
Thanked 0 Times in 0 Posts
dvarvel is on a distinguished road
Re: DoCmd.OpenReport Error

Yes, they are indexed.

Last edited by dvarvel; 11-28-2017 at 12:34 PM.
dvarvel is offline   Reply With Quote
Old 11-28-2017, 01:27 PM   #33
Mark_
Longboard on the internet
 
Join Date: Sep 2017
Location: Not the middle of no where, but I can see the road to it from my house.
Posts: 2,037
Thanks: 20
Thanked 381 Times in 374 Posts
Mark_ will become famous soon enough Mark_ will become famous soon enough
Re: DoCmd.OpenReport Error

If you are worried about how long it takes, I'd put a control on the screen that gets updated with "Working on State " & [State] or something similar. That way your users know what its doing and don't complain that its just sitting there...

Your biggest time eater is probably creating the PDFs. I've seen that happen with reports before.

Mark_ is online now   Reply With Quote
Old 11-29-2017, 06:59 AM   #34
dvarvel
Newly Registered User
 
Join Date: Nov 2017
Posts: 22
Thanks: 9
Thanked 0 Times in 0 Posts
dvarvel is on a distinguished road
Re: DoCmd.OpenReport Error

[QUOTE=Mark_;1556545] "I'd put a control on the screen that gets updated with "Working on State " & [State] or something similar. That way your users know what its doing and don't complain that its just sitting there..."

I don't know how to do this. Can you please help?
dvarvel is offline   Reply With Quote
Old 11-29-2017, 10:07 AM   #35
Mark_
Longboard on the internet
 
Join Date: Sep 2017
Location: Not the middle of no where, but I can see the road to it from my house.
Posts: 2,037
Thanks: 20
Thanked 381 Times in 374 Posts
Mark_ will become famous soon enough Mark_ will become famous soon enough
Re: DoCmd.OpenReport Error

1) On your form, I would add a label called "Lbl_WorkingOn"
2) In your existing code, just after


LoopedFieldValue = rs.Fields(LoopedField)

add

Me.Lbl_WorkingOn.Caption = "Outputting report for " & LoopedFieldValue

3) After you are done with your loop I would add

Me.Lbl_WorkingOn.Caption = ""

This would display which report you export only while exporting. It would also give you an idea of how long each report takes to make.

If you really wanted to get tricky you can also put the time each starts up. That would let you, the programmer, know if something seems strange.

Mark_ is online now   Reply With Quote
The Following User Says Thank You to Mark_ For This Useful Post:
dvarvel (11-29-2017)
Reply

Tags
docmd.openreport , error , loop

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DoCmd.OpenReport OpenArgs error JGravesNBS Forms 3 11-17-2015 01:25 PM
DoCmd.OpenReport worked once, now error cjcobra Forms 3 01-26-2011 05:45 PM
Runtime error 2046 on doCmd.gotoRecord after doCmd.openReport Alexie Forms 3 06-03-2010 02:58 AM
Where Clause Error In The DoCmd.OpenReport cheer Forms 23 11-14-2009 08:06 AM
Access2002: Docmd.OpenReport Error mary.h Modules & VBA 6 10-08-2003 11:54 AM




All times are GMT -8. The time now is 04:30 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World