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 / April 2008

Tip: Looking for answers? Try searching our database.

Print individual reports for all outstanding invoices

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DMainland - 21 Apr 2008 15:41 GMT
I use a report that generates all invoices outstanding for an individual
customer.  I select the customer I want to report on from a dropdown list.  I
would like to be able to print the same report for all customers who have
invoices outstanding, not just individual customers selected one at a time.  
Any help would be greatly appreciated.
Signature

DMainland

Klatuu - 21 Apr 2008 17:36 GMT
This involves using a couple of techniques together.  First, the record
source for the report.  I assume you are probably using a query for the
record source that filters on the value in the combo box.  If this is the
case, remove the filtering at the query level, we will do it at the form
level.

Now, we need to use the "Adding All to a Combo Box" technique.  Since I
don't know the structure of your client table or your combo box, I can't give
an exact answer, but for example purposes, I will assume your combo has two
columns, one for the ClientID which would be an autonumber primary key and
one for ClientName that the user actually sees and your combo's row source
query is something like:
SELECT ClientID, ClientName FROM tblClient ORDER BY ClientName;

So, change it to:
SELECT 0 AS ClientID, "(All)" AS ClientName FROM tblClient UNION SELECT
ClientID, ClientName FROM tblClient ORDER BY ClientName;

Now the user will see (All) as an option in the combo list.  The next thing
to do is use the OpenReport method to open the report for a selected client
or all clients depending on whether the user selects (All).  That you do
where you open the report.  I assume it is in the Click event of a command
button.  This would be an example for that:

Dim strWhere As String

   If Me.cboSelectClient = 0 Then
       strWhere = vbNullString
   Else
       strWhere = "[ClientID = " & Me.cboSelectClient
   End IF

   Docmd.OpenReport "ReportName", , , strWhere

Signature

Dave Hargis, Microsoft Access MVP

> I use a report that generates all invoices outstanding for an individual
> customer.  I select the customer I want to report on from a dropdown list.  I
> would like to be able to print the same report for all customers who have
> invoices outstanding, not just individual customers selected one at a time.  
> Any help would be greatly appreciated.
DMainland - 21 Apr 2008 19:39 GMT
Thanks for your reply and answer.  I will give it a try.  I am no genius with
Access but I will follow your instructions and let you know how it turned
out.  Thanks again.
Signature

DMainland

> This involves using a couple of techniques together.  First, the record
> source for the report.  I assume you are probably using a query for the
[quoted text clipped - 35 lines]
> > invoices outstanding, not just individual customers selected one at a time.  
> > Any help would be greatly appreciated.
 
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.