ted.martin
Registered User.
- Local time
- Today, 16:05
- Joined
- Sep 24, 2004
- Messages
- 743
I have a filtered Form that when the form opens, if the user immediately presses a command button to print the form's data, a dlookup value in a textbox sometimes prints as zero rather than the correct value.
If I introduce a 2 second pause in the cmdprint report code, everything works fine as the form then has time to fully load. You can see the textbox waiting for the value to be calculated when you open the form. There is a definite delay and if you press the print command button too soon, the result is incorrect.
I have tried using DoEvents in cmdprint event but it seems to make no difference.
I just don't think using a 2 seconds Pause in the cmdprint code is kool.
Any suggestions would be welcome.
If I introduce a 2 second pause in the cmdprint report code, everything works fine as the form then has time to fully load. You can see the textbox waiting for the value to be calculated when you open the form. There is a definite delay and if you press the print command button too soon, the result is incorrect.
I have tried using DoEvents in cmdprint event but it seems to make no difference.
I just don't think using a 2 seconds Pause in the cmdprint code is kool.
Any suggestions would be welcome.