Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple reports same query 1

Status
Not open for further replies.

kennedymr2

Programmer
May 23, 2001
594
AU
in VBa i am printing several reports , but the problem i have is they are using the same query.. i keep getting a message that the table is already in use

Is there a way of stopping the preview of the second report until the first report is printed and completed,


This is the code

Dim stDocName As String
stDocName = "FODETDSalesCommissionDue1"
DoCmd.OpenReport stDocName, acPreview

???can we stop it here ??? eg While viewing ???


stDocName3 = "FODETDSalesCommissionOS1"
DoCmd.OpenReport stDocName3, acPreview



stDocName = "sumx"
DoCmd.OpenReport stDocName, acPreview


Appreciate any help

Kennedymr2

 
you could check for the open report and open the second one only if it is closed you would need a loop to do it OR ... create separate queries?

Thoughts

HTH << MaZeWorX >> "I have not failed I have only found ten thousand ways that don't work
 
Mazeworx..

Thanks for your comments.

A bit hard to do seperate query's in this instance.

Looking for while ??????? report is open
do events
wend


regards Kennedymr2


 
do while CurrentProject.AllReports("Reportname").IsLoaded
doevents
loop
 
PWise

Exactly what i was after... many thanks... helped a lot

Regards Kennedymr2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top