Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / May 2008

Tip: Looking for answers? Try searching our database.

Creating a report for each record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Emma - 12 May 2008 15:51 GMT
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?
Damon Heron - 12 May 2008 21:08 GMT
Sounds like you may have used a wizard to create the click event for the
command button.  What is the code?

Damon

>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?
Emma - 13 May 2008 11:26 GMT
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

> Sounds like you may have used a wizard to create the click event for the
> command button.  What is the code?
[quoted text clipped - 7 lines]
> > 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?
Emma - 13 May 2008 11:29 GMT
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

> Sounds like you may have used a wizard to create the click event for the
> command button.  What is the code?
[quoted text clipped - 7 lines]
> > 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?
Damon Heron - 13 May 2008 17:14 GMT
The button click looks okay, so it must be in the report.  Open the report
in design view and look at the record source.  It could be restricting the
report to the current record on the form.  But the question arises, do you
want all of your records printed each time you call the report?  There has
to be some limits on the records invoices printed, or you will be
duplicating invoices over and over.  Perhaps you need to restrict the
invoices to a number or date range.

Damon

> is this the code?
>
[quoted text clipped - 33 lines]
>> > so i
>> > can't have the report (invoice)on the other records.  Can anyone help?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.