G
Guest
I create a form and a button on the form. When I click the button, the code
would send information to the report to be printed out. However, data show up
on the report only when I debug line-by-line (there are no error at all. I
open connection to the database and recordsets). Otherwise, it prints out
blank pages.
Do you know why I have to trace line by line for the report to be printed
the data. If I don't do that, the report would print the blank page :=(. This
report has a dynamic record source, i.e., each time the program runs, the
program makes a query with new data. Thank you.
Here is some sample of code:
rsSample.AddNew
rsSample.Fields(0) = strID
rsSample.Fields(1) = rsS.Fields(2)
rsSample.Fields(2) = rsS.Fields(3)
rsSample.Update
rsSample.MoveNext
If rsSample.EOF Then
Exit Do
End If
Loop
DoCmd.OpenReport "rptSample", acViewNormal
would send information to the report to be printed out. However, data show up
on the report only when I debug line-by-line (there are no error at all. I
open connection to the database and recordsets). Otherwise, it prints out
blank pages.
Do you know why I have to trace line by line for the report to be printed
the data. If I don't do that, the report would print the blank page :=(. This
report has a dynamic record source, i.e., each time the program runs, the
program makes a query with new data. Thank you.
Here is some sample of code:
rsSample.AddNew
rsSample.Fields(0) = strID
rsSample.Fields(1) = rsS.Fields(2)
rsSample.Fields(2) = rsS.Fields(3)
rsSample.Update
rsSample.MoveNext
If rsSample.EOF Then
Exit Do
End If
Loop
DoCmd.OpenReport "rptSample", acViewNormal