Creating a report for each record

  • Thread starter Thread starter Emma
  • Start date Start date
E

Emma

I have set up a report using the fields in my main database into an invoice
design, with the desire to have an invoice for each of my records however
each time i click on the command button from a records form page taking me to
the report, its only ever giving me the details of one of my records, so i
can't have the report (invoice)on the other records. Can anyone help?
 
does this look like the code:

Private Sub Preview_Invoice_Click()
On Error GoTo Err_Preview_Invoice_Click

Dim stDocName As String

stDocName = "Lewisham PDC Publications Invoice 2008-09"
DoCmd.OpenReport stDocName, acPreview

Exit_Preview_Invoice_Click:
Exit Sub

Err_Preview_Invoice_Click:
MsgBox Err.Description
Resume Exit_Preview_Invoice_Click

End Sub

thanks
Emma
 
is this the code?

Private Sub Preview_Invoice_Click()
On Error GoTo Err_Preview_Invoice_Click

Dim stDocName As String

stDocName = "Lewisham PDC Publications Invoice 2008-09"
DoCmd.OpenReport stDocName, acPreview

Exit_Preview_Invoice_Click:
Exit Sub

Err_Preview_Invoice_Click:
MsgBox Err.Description
Resume Exit_Preview_Invoice_Click

End Sub

thanks
emma
 
Back
Top