any ideas on how to stop a blank report from printing? <br>
<br>
i am going through a table and printing a set of reports for each record. is there any code i can use to check whether the report is blank and skip printing if it is?<br>
<br>
this is the code i'm using<br>
<br>
Sub RegionVPReports()<br>
<br>
Dim dbs As Database<br>
Dim rstName As Recordset<br>
<br>
Set dbs = CurrentDb<br>
Set rstName = dbs.OpenRecordset("RegionT"
<br>
<br>
Do Until rstName.EOF<br>
<br>
DoCmd.OpenReport "TM Summary", , , "tmt.REGION='" & rstName!Region & "'"<br>
.<br>
.<br>
.<br>
<br>
rstName.MoveNext<br>
Loop<br>
<br>
rstName.Close<br>
<br>
End Sub<br>
<br>
Thanks<br>
<br>
<br>
i am going through a table and printing a set of reports for each record. is there any code i can use to check whether the report is blank and skip printing if it is?<br>
<br>
this is the code i'm using<br>
<br>
Sub RegionVPReports()<br>
<br>
Dim dbs As Database<br>
Dim rstName As Recordset<br>
<br>
Set dbs = CurrentDb<br>
Set rstName = dbs.OpenRecordset("RegionT"
<br>
Do Until rstName.EOF<br>
<br>
DoCmd.OpenReport "TM Summary", , , "tmt.REGION='" & rstName!Region & "'"<br>
.<br>
.<br>
.<br>
<br>
rstName.MoveNext<br>
Loop<br>
<br>
rstName.Close<br>
<br>
End Sub<br>
<br>
Thanks<br>
<br>