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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to clear access report after auto generated information.

Status
Not open for further replies.

JB2212

IS-IT--Management
May 22, 2003
1
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top