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, 7 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
-
regarding april update and may update
by
heybengbeng
26 minutes ago -
MS Passkey
by
pmruzicka
6 hours, 12 minutes ago -
Can’t make Opera my default browser
by
bmeacham
8 hours, 6 minutes ago -
*Some settings are managed by your organization
by
rlowe44
5 hours, 59 minutes ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
7 hours, 1 minute ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
1 day, 2 hours ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
1 day, 11 hours ago -
AI slop
by
Susan Bradley
1 hour, 48 minutes ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
1 day, 13 hours ago -
Two blank icons
by
CR2
43 minutes ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
1 day, 21 hours ago -
End of 10
by
Alex5723
2 days ago -
Single account cannot access printer’s automatic duplex functionality
by
Bruce
22 hours, 29 minutes ago -
test post
by
gtd12345
2 days, 6 hours ago -
Privacy and the Real ID
by
Susan Bradley
1 day, 20 hours ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
1 day, 12 hours ago -
Cant log on to oldergeeks.Com
by
WSJonharnew
2 days, 10 hours ago -
Upgrading from Win 10
by
WSjcgc50
22 hours, 38 minutes ago -
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
1 day, 2 hours ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
3 days, 2 hours ago -
The story of Windows Longhorn
by
Cybertooth
2 days, 14 hours ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
3 days, 4 hours ago -
Are manuals extinct?
by
Susan Bradley
4 hours, 55 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
3 days, 13 hours ago -
Network Issue
by
Casey H
3 days ago -
Fedora Linux is now an official WSL distro
by
Alex5723
4 days, 1 hour ago -
May 2025 Office non-Security updates
by
PKCano
4 days, 2 hours ago -
Windows 10 filehistory including onedrive folder
by
Steve Bondy
4 days, 4 hours ago -
pages print on restart (Win 11 23H2)
by
cyraxote
3 days, 4 hours ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
4 days, 6 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.