W
Warren
This post might be long, so please bear with me.
My goal is to export a report to RTF.
In the same function, I:
1) execute an Insert query
2) retrieve the Autonumber associated with the Insert
3) create a SQL statement to be used as the RecordSource
for my report
4) run the DoCmd.OutputTo function to export the report to
RTF format
I have done some testing, and realized that the report is
often Empty because the information that is supposed to be
used to generate the report (i.e. Insert statement from
Step1) is not yet "committed" to the database.
Between Step 3 and Step 4, I have added a busy wait using:
Do While rs.RecordCount < 1
Set rs = CurrentDB.openRecordset("Select statement")
Loop
(this is a VERY bad implementation, but the only
implementation that works for me)
My function now works, and the report is fine, but I am
worried about using the Busy Wait.
Any alternative suggestions?
Thanks
Warren
My goal is to export a report to RTF.
In the same function, I:
1) execute an Insert query
2) retrieve the Autonumber associated with the Insert
3) create a SQL statement to be used as the RecordSource
for my report
4) run the DoCmd.OutputTo function to export the report to
RTF format
I have done some testing, and realized that the report is
often Empty because the information that is supposed to be
used to generate the report (i.e. Insert statement from
Step1) is not yet "committed" to the database.
Between Step 3 and Step 4, I have added a busy wait using:
Do While rs.RecordCount < 1
Set rs = CurrentDB.openRecordset("Select statement")
Loop
(this is a VERY bad implementation, but the only
implementation that works for me)
My function now works, and the report is fine, but I am
worried about using the Busy Wait.
Any alternative suggestions?
Thanks
Warren