R
Rick
I have a form that pulls a report based on a list of active clients, sends
it through email to the client, advances the control to the next client,
pulls the report based on the client, sends it through email, etc.
The problem is that when LAN traffic is high, it will often start building
the report before the client has updated to the next record. When the email
sends, it finds the client address, but it sends the report for the PREVIOUS
customer. This means "AAB Office Supplies" is getting the report with
information related to "AAA Office Supplies".
My question is this, how can I insert pauses into my code? I would like to
tell it to advance to the next record, then pause for a few seconds before
opening the report.
I have tried the following code that I found on another form, but it does
not seem to be doing anything. Did I need to 'dim' the variable 'Timer'?
Did I need to do anything in my 'ontimer' event for the form? The way I
understand ontimer is that it runs the entered code every X seconds which
would not work in this case since I want to pause at a particular point in
the process.
Do While Timer < 100.0 ' Pause to allow form to get correct record
DoEvents
Loop
Thanks in advance for any help you can offer. I have learned so much from
this newsgroup!!!!
Rick
it through email to the client, advances the control to the next client,
pulls the report based on the client, sends it through email, etc.
The problem is that when LAN traffic is high, it will often start building
the report before the client has updated to the next record. When the email
sends, it finds the client address, but it sends the report for the PREVIOUS
customer. This means "AAB Office Supplies" is getting the report with
information related to "AAA Office Supplies".
My question is this, how can I insert pauses into my code? I would like to
tell it to advance to the next record, then pause for a few seconds before
opening the report.
I have tried the following code that I found on another form, but it does
not seem to be doing anything. Did I need to 'dim' the variable 'Timer'?
Did I need to do anything in my 'ontimer' event for the form? The way I
understand ontimer is that it runs the entered code every X seconds which
would not work in this case since I want to pause at a particular point in
the process.
Do While Timer < 100.0 ' Pause to allow form to get correct record
DoEvents
Loop
Thanks in advance for any help you can offer. I have learned so much from
this newsgroup!!!!
Rick