Please select Dicembre(December) and 2003 on the startup form of the attached mdb and open the RCons report. Is there any way to shorten the time it takes(minutes) to display the report?
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Slow-opening Report (2000)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Slow-opening Report (2000)
- This topic has 43 replies, 6 voices, and was last updated 20 years, 6 months ago.
AuthorTopicWSgrovelli
AskWoody LoungerSeptember 7, 2004 at 7:17 am #409581Viewing 6 reply threadsAuthorReplies-
WSpatt
AskWoody Lounger -
WSpatt
AskWoody Lounger -
WSFrancois
AskWoody Lounger -
WSgrovelli
AskWoody LoungerSeptember 17, 2004 at 4:09 am #878029Hi Francois, I’ve tried to cut down on the number of all those calls to the EnerOm function by substituting all those Dlookup functions in the Rcons report text boxes with several subreports, each one having a query as record source and also by pre-calculating the energy by using the EnerOm function only for the time range needed using a query but the report still opens painfully slow.
So I’ve decided to create an Energia field in the G1Dez table that gets updated only when the Lettur text box in the MG1Dez form gets updated(please see attachment).
The problem is that if you, for example, select December 30, 2003 on the calendar and modify the value in the Lettur text box, the Energia text box doesn’t reflect the change.
I thought the following code should take care of that but it doesn’t.
Private Sub LETTUR_AfterUpdate()
DoCmd.SetWarnings False
DoCmd.OpenQuery “query7”
DoCmd.SetWarnings True
‘Me.Refresh
End Sub
-
WSpatt
AskWoody LoungerSeptember 16, 2004 at 9:53 pm #878156From what I can see you are running an update query on a record you are editting, this would create a conflict as far as I know.
Why don’t you substitute the following:
Energia = EnerOm(“g1dez”, “dezg1k”, [Giorno], [ORE_MARC])
for:
DoCmd.SetWarnings False
DoCmd.OpenQuery “query7”
DoCmd.SetWarnings True
‘Me.Refresh -
WSgrovelli
AskWoody Lounger -
WSpatt
AskWoody Lounger -
WSgrovelli
AskWoody LoungerSeptember 17, 2004 at 7:57 am #878269I’ve taken it out and typed 10677.28 for Dec 30, 2003 but the Energia text box value remains unchanged. I’d like to point out that if you keep on modifying the value in the Lettur text box, the value in the Energia text box does change but it always reflects the previous, not the current, change in the Lettur text box. That’s why I tried and used the Refresh method to see if the current change in the Lettur text box could be reflected right away in a change in the Energia text box.
-
WSpatt
AskWoody Lounger -
WSpatt
AskWoody Lounger -
WSgrovelli
AskWoody Lounger -
WScharlotte
AskWoody Lounger -
WSgrovelli
AskWoody LoungerSeptember 17, 2004 at 12:13 pm #878382Hi Charlotte
I put a breakpoint into that AfterUpdate event and it does fire. Problem is the Energia text box gets updated if you keep on modifying the value in the Lettur text box but it always reflects the previous, not the current, change in the Lettur text box.
If you select, say, Dec 30, 2003 on the calendar you can see that the Lettur text box shows 10676.28 and the Energia text box is initially empty. If you type, for example 10677.28 in the Lettur text box, the Energia text box displays 1485(which is the Energia field value in the G1Dez table corresponding to the Lettur field value for that day), if you type again the same number in the Lettur text box, the Energia text box now displays 1985, which is the output given by the EnerOm function when the Lettur value is 10677.28. If you want the Energia text box to display again the correct value(1485) for when the Lettur text box value is 10676.28, you have to type that value twice in the Lettur text box. -
WSgrovelli
AskWoody LoungerSeptember 17, 2004 at 12:13 pm #878383Hi Charlotte
I put a breakpoint into that AfterUpdate event and it does fire. Problem is the Energia text box gets updated if you keep on modifying the value in the Lettur text box but it always reflects the previous, not the current, change in the Lettur text box.
If you select, say, Dec 30, 2003 on the calendar you can see that the Lettur text box shows 10676.28 and the Energia text box is initially empty. If you type, for example 10677.28 in the Lettur text box, the Energia text box displays 1485(which is the Energia field value in the G1Dez table corresponding to the Lettur field value for that day), if you type again the same number in the Lettur text box, the Energia text box now displays 1985, which is the output given by the EnerOm function when the Lettur value is 10677.28. If you want the Energia text box to display again the correct value(1485) for when the Lettur text box value is 10676.28, you have to type that value twice in the Lettur text box. -
WSgrovelli
AskWoody LoungerSeptember 17, 2004 at 3:59 pm #878412Charlotte, I think the problem lies in the fact the EnerOm function recalls a Lettur value from the G1Dez table and not from the Lettur text box so I changed the line of code:
lett = DLookup(“LETTUR”, tab1, “Giorno=#” & Format(gio, “mm-dd-yyyy”) & “#”)
in the EnerOm function into:
lett = Parent!MG1Dez!LETTUR
but I get the VBA message: Run-time error ‘438’. Object doesn’t support this property or method .
What’s the correct syntax? -
WScharlotte
AskWoody LoungerSeptember 17, 2004 at 3:06 pm #878470 -
WSgrovelli
AskWoody Lounger -
WScharlotte
AskWoody Lounger -
WSgrovelli
AskWoody LoungerSeptember 17, 2004 at 4:07 pm #878501Microsoft Visual Basic Help says: “The Me keyword can’t appear in a standard module because a standard module doesn’t represent an object.”
The EnerOm function is located in a standard module so I guess it’s outside the subform.
What is the syntax for referencing the Lettur text box in this case? -
WScharlotte
AskWoody LoungerSeptember 17, 2004 at 7:25 pm #878556I thought you had this code in the AfterUpdate of the Lettur control. Didn’t you say you had changed the code to NOT use EnerOm? If you want to refer to a control in a procedure in a standard module, the easiest way is to pass the control to the routine. The routine can look at the control and get its value, plus it can also get information about the form that contains the control. If all you’re doing is using a function to return the value of a control so you can set the value of another control on the same subform, it doesn’t really make sense to do it outside the subform.
-
WSgrovelli
AskWoody Lounger -
WSgrovelli
AskWoody Lounger -
WScharlotte
AskWoody LoungerSeptember 17, 2004 at 7:25 pm #878557I thought you had this code in the AfterUpdate of the Lettur control. Didn’t you say you had changed the code to NOT use EnerOm? If you want to refer to a control in a procedure in a standard module, the easiest way is to pass the control to the routine. The routine can look at the control and get its value, plus it can also get information about the form that contains the control. If all you’re doing is using a function to return the value of a control so you can set the value of another control on the same subform, it doesn’t really make sense to do it outside the subform.
-
WSgrovelli
AskWoody LoungerSeptember 17, 2004 at 4:07 pm #878502Microsoft Visual Basic Help says: “The Me keyword can’t appear in a standard module because a standard module doesn’t represent an object.”
The EnerOm function is located in a standard module so I guess it’s outside the subform.
What is the syntax for referencing the Lettur text box in this case? -
WScharlotte
AskWoody Lounger -
WSgrovelli
AskWoody Lounger -
WScharlotte
AskWoody LoungerSeptember 17, 2004 at 3:06 pm #878471 -
WSgrovelli
AskWoody LoungerSeptember 17, 2004 at 3:59 pm #878413Charlotte, I think the problem lies in the fact the EnerOm function recalls a Lettur value from the G1Dez table and not from the Lettur text box so I changed the line of code:
lett = DLookup(“LETTUR”, tab1, “Giorno=#” & Format(gio, “mm-dd-yyyy”) & “#”)
in the EnerOm function into:
lett = Parent!MG1Dez!LETTUR
but I get the VBA message: Run-time error ‘438’. Object doesn’t support this property or method .
What’s the correct syntax? -
WScharlotte
AskWoody Lounger -
WSgrovelli
AskWoody Lounger -
WSgrovelli
AskWoody LoungerSeptember 17, 2004 at 7:57 am #878270I’ve taken it out and typed 10677.28 for Dec 30, 2003 but the Energia text box value remains unchanged. I’d like to point out that if you keep on modifying the value in the Lettur text box, the value in the Energia text box does change but it always reflects the previous, not the current, change in the Lettur text box. That’s why I tried and used the Refresh method to see if the current change in the Lettur text box could be reflected right away in a change in the Energia text box.
-
WSpatt
AskWoody Lounger
-
-
WSgrovelli
AskWoody Lounger
-
-
WSpatt
AskWoody LoungerSeptember 16, 2004 at 9:53 pm #878157From what I can see you are running an update query on a record you are editting, this would create a conflict as far as I know.
Why don’t you substitute the following:
Energia = EnerOm(“g1dez”, “dezg1k”, [Giorno], [ORE_MARC])
for:
DoCmd.SetWarnings False
DoCmd.OpenQuery “query7”
DoCmd.SetWarnings True
‘Me.Refresh
-
-
WSgrovelli
AskWoody LoungerSeptember 17, 2004 at 4:09 am #878030Hi Francois, I’ve tried to cut down on the number of all those calls to the EnerOm function by substituting all those Dlookup functions in the Rcons report text boxes with several subreports, each one having a query as record source and also by pre-calculating the energy by using the EnerOm function only for the time range needed using a query but the report still opens painfully slow.
So I’ve decided to create an Energia field in the G1Dez table that gets updated only when the Lettur text box in the MG1Dez form gets updated(please see attachment).
The problem is that if you, for example, select December 30, 2003 on the calendar and modify the value in the Lettur text box, the Energia text box doesn’t reflect the change.
I thought the following code should take care of that but it doesn’t.
Private Sub LETTUR_AfterUpdate()
DoCmd.SetWarnings False
DoCmd.OpenQuery “query7”
DoCmd.SetWarnings True
‘Me.Refresh
End Sub
-
-
WSFrancois
AskWoody Lounger -
WSMarkLiquorman
AskWoody LoungerSeptember 7, 2004 at 1:39 pm #874165I didn’t download the report, but does it have a “Page 1 of 20 Pages” type of entry? This essentially causes the report to be run twice, the first time internally to get the total number of pages, even before it displays anything. Then it is run again for “real”. This is a killer for really big reports.
An additional thought. What about the report sequencing and criteria selection fields? If you don’t have proper indexes on you tables, the more info the report must suck-in before it can run.
-
WSDrew
AskWoody Lounger -
WSgrovelli
AskWoody Lounger -
WSgrovelli
AskWoody Lounger
-
-
WSDrew
AskWoody Lounger
Viewing 6 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Ubuntu 25.04 (Plucky Puffin) Beta released
by
Alex5723
56 minutes ago -
How to install App Store apps on an external SSD
by
Alex5723
1 hour, 49 minutes ago -
Where is Windows going?
by
Susan Bradley
3 hours, 7 minutes ago -
Does anyone know how can we convert OST to Office 365? (Awaiting moderation)
by
Sanchit Tandon
5 hours, 34 minutes ago -
Installing Feature Update Windows 11 24H2
by
geekdom
19 hours, 18 minutes ago -
Windows 11 Insider Preview build 27823 released to Canary
by
joep517
19 hours, 42 minutes ago -
Windows 11 Hotpatch
by
Hackmuss
3 hours ago -
System Guard service error still won’t be fixed
by
Susan Bradley
20 hours, 21 minutes ago -
Operation ForumTroll: APT attack with Google Chrome zero-day exploit chain
by
Alex5723
14 hours, 32 minutes ago -
Troy Hunt of HaveIBeenPwned Phished
by
Lars220
11 hours, 33 minutes ago -
Microsoft Windows security auditing Code 5061
by
mpw
1 day, 8 hours ago -
Can’t display images in incoming Outlook 365 emails
by
WScopwriter
16 hours, 30 minutes ago -
Windows 11 Insider Preview Build 26200.5510 early builds of 25H2
by
Alex5723
17 hours, 58 minutes ago -
0Patch : Micropatches released for SCF File NTLM Hash Disclosure Vulnerability
by
Alex5723
17 hours, 27 minutes ago -
Select multiple emails and they all open up!
by
CeeJay
2 days, 10 hours ago -
How to remove an update preview
by
Gunny
12 hours, 51 minutes ago -
Third party add ins reminder
by
Susan Bradley
8 hours, 26 minutes ago -
OTF, which backs Tor, Let’s Encrypt and more, sues to save its funding
by
Nibbled To Death By Ducks
2 days, 3 hours ago -
Updating Windows 10 to Windows 11: 23H2 or 24H2?
by
Still Anonymous
2 days, 14 hours ago -
How can I update “Explorer Patcher”
by
WSplanckster
2 days, 16 hours ago -
Check out the home page for Signal
by
CAS
2 days, 14 hours ago -
Windows 11 and Trial version of MS Office
by
Tex265
2 days, 13 hours ago -
Windows 11 Insider Preview build 26120.3585 (24H2) released to BETA
by
joep517
2 days, 20 hours ago -
Windows 11 Insider Preview build 26200.5510 released to DEV
by
joep517
2 days, 20 hours ago -
Windows 11 Insider Preview Build 26100.3624 (24H2) released to Release Preview
by
joep517
2 days, 20 hours ago -
Limits on User Names
by
CWBillow
2 days, 17 hours ago -
MS-DEFCON 4: Mixed bag for March
by
Susan Bradley
17 hours, 32 minutes ago -
Non Apple Keyboards
by
pmcjr6142
18 hours, 48 minutes ago -
How to delete your 23andMe data – The Verge
by
AJNorth
2 days, 15 hours ago -
7 common myths about Windows 11 (Microsoft AD)
by
EyesOnWindows
2 days, 13 hours ago
Recent blog posts
- Where is Windows going?
- System Guard service error still won’t be fixed
- Third party add ins reminder
- MS-DEFCON 4: Mixed bag for March
- Classic and Extended Control Panel — no need to say goodbye
- Things you can do in 2025 that you couldn’t do in 2024
- Revisiting Windows 11’s File Explorer
- Planning ahead for migration
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.