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, 8 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 LoungerWSMarkLiquorman
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 LoungerWSDrew
AskWoody LoungerViewing 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
-
.NET 8.0 Desktop Runtime (v8.0.16) – Windows x86 Installer
by
WSmeyerbos
2 hours, 40 minutes ago -
Neowin poll : What do you plan to do on Windows 10 EOS
by
Alex5723
2 hours, 2 minutes ago -
May 31, 2025—KB5062170 (OS Builds 22621.5415 and 22631.5415 Out-of-band
by
Alex5723
1 hour, 14 minutes ago -
Discover the Best AI Tools for Everything
by
Alex5723
1 hour, 23 minutes ago -
Edge Seems To Be Gaining Weight
by
bbearren
2 hours, 6 minutes ago -
Rufus is available from the MSFT Store
by
PL1
1 day ago -
Microsoft : Ending USB-C® Port Confusion
by
Alex5723
1 day, 2 hours ago -
KB5061768 update for Intel vPro processor
by
drmark
8 hours, 50 minutes ago -
Outlook 365 classic has exhausted all shared resources
by
drmark
5 hours, 1 minute ago -
My Simple Word 2010 Macro Is Not Working
by
mbennett555
22 hours, 11 minutes ago -
Office gets current release
by
Susan Bradley
1 day ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
2 days, 14 hours ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
1 day, 23 hours ago -
Stop the OneDrive defaults
by
CWBillow
2 days, 15 hours ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
3 days, 1 hour ago -
X Suspends Encrypted DMs
by
Alex5723
3 days, 3 hours ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
3 days, 4 hours ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
3 days, 4 hours ago -
OpenAI model sabotages shutdown code
by
Cybertooth
3 days, 5 hours ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
2 days, 17 hours ago -
Enabling Secureboot
by
ITguy
3 days ago -
Windows hosting exposes additional bugs
by
Susan Bradley
3 days, 13 hours ago -
No more rounded corners??
by
CWBillow
3 days, 9 hours ago -
Android 15 and IPV6
by
Win7and10
2 days, 22 hours ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
4 days, 1 hour ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
4 days, 4 hours ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
3 days, 22 hours ago -
Windows Update orchestration platform to update all software
by
Alex5723
4 days, 11 hours ago -
May preview updates
by
Susan Bradley
3 days, 23 hours ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
3 days, 14 hours ago
Recent blog posts
Key Links
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
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.