Set up the query to be a recordset in your module.
~~~~
Dim dbs as database
Dim rst as recordset
Set dbs = CurrentDB
set rst = dbs.openrecordset("YourQueryNameHere, dbopendynaset)
If (rst.BOF and rst.Eof) then
MsgBox "Empty"
Else
'whatever necessary for the report here
DoCmd.OpenReport "YourReportNameHere", acPreview
End If
Set rst = Nothing
Set dbs = Nothing
MichaelRed
mred@att.net
There is never time to do it right but there is always time to do it over
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.