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?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
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 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
-
I hate that AI is on every computer we have! (Awaiting moderation)
by
1bumthumb
1 hour, 46 minutes ago -
Windows Update says that “some settings are managed b your organization”
by
Ed Willers
1 hour, 50 minutes ago -
Use of Gmail rejected.
by
CBFPD-Chief115
8 hours, 8 minutes ago -
WuMgr operational questions
by
Tex265
8 hours, 52 minutes ago -
Beijing’s unprecedented half-marathon: Humans vs. humanoids!
by
Alex5723
13 hours, 55 minutes ago -
New Phishing Campaign Targeted at Mac Users
by
Alex5723
3 hours, 25 minutes ago -
Backing up Google Calendar
by
CWBillow
20 hours, 23 minutes ago -
Windows 11 Insider Preview build 27818 released to Canary
by
joep517
1 day, 9 hours ago -
File Naming Conventions (including Folders)
by
Magic66
7 hours, 45 minutes ago -
Windows 11 Insider Preview Build 26100.3613 (24H2) released to Release Preview
by
joep517
1 day, 16 hours ago -
Microsoft sends emails to Windows 10 users about EOS
by
Alex5723
1 day, 2 hours ago -
Outlook 2024 importing Calendar and Contacts – FAILURE
by
Kathy Stevens
9 hours, 15 minutes ago -
Adding Microsoft Account.
by
DaveBRenn
1 day, 17 hours ago -
Windows 11 Insider Preview build 26120.3576 released to DEV and BETA
by
joep517
2 days, 17 hours ago -
Windows 11 Insider Preview Build 22635.5090 (23H2) released to BETA
by
joep517
2 days, 17 hours ago -
Windows 11 won’t boot
by
goducks25
10 hours, 3 minutes ago -
Choosing virtual machine product for Windows on Mac
by
peterb
2 days, 7 hours ago -
Rest in Peace
by
Roy Lasris
3 days, 12 hours ago -
CISA : Install Windows March 2025 Updates until April 1 or shut down PC.
by
Alex5723
9 hours, 38 minutes ago -
Google proposes users with incompatible Win 11 PCs to migrate to ChromeOS Flex
by
Alex5723
3 days, 12 hours ago -
Drivers for Epson Perfection V600 Photo – scanner
by
Bookman
3 hours, 56 minutes ago -
Long Time Member
by
jackpet
3 days, 15 hours ago -
Woody Leonhard (1951–2025)
by
Will Fastie
10 hours, 46 minutes ago -
What I learned from Woody Leonhard
by
B. Livingston
3 days, 8 hours ago -
Windows Settings today
by
Simon Bisson
3 days, 23 hours ago -
Mail Merge magic in Microsoft Word
by
Peter Deegan
21 hours, 24 minutes ago -
Businesses in the crosshairs
by
Susan Bradley
2 days, 13 hours ago -
Double-row taskbar?
by
CWBillow
1 day, 4 hours ago -
Upgrading non-supported HW to Win 11
by
RetiredGeek
1 day, 14 hours ago -
Audio locks up after 15 minutes
by
WSArthurR
1 day, 14 hours ago
Recent blog posts
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.