I have designed a database with access 2000, and created a command button that inserts information into a report. It works great on the first record, but when I try to generate the report from the second record, the information from the first appears. How do I clear the report so it uses the information from each new record when I generate it? I have a report named Job Info, and a Query named Print Job Info Here is my code:
Private Sub PrintFrm_Click()
On Error GoTo Err_PrintFrm_Click
Dim stDocName As String
stDocName = "Job Info"
DoCmd.OpenReport stDocName, acPreview
Exit_PrintFrm_Click:
Exit Sub
Err_PrintFrm_Click:
MsgBox Err.Description
Resume Exit_PrintFrm_Click
End Sub
Private Sub PrintFrm_Click()
On Error GoTo Err_PrintFrm_Click
Dim stDocName As String
stDocName = "Job Info"
DoCmd.OpenReport stDocName, acPreview
Exit_PrintFrm_Click:
Exit Sub
Err_PrintFrm_Click:
MsgBox Err.Description
Resume Exit_PrintFrm_Click
End Sub