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

generating mulitple types of reports from one series of numbers

Status
Not open for further replies.

slames

Technical User
Nov 5, 2002
211
GB
I have a table tblInvoices with a primary key InvID. This table needs to hold data corresponding to different types of invoices including, credit notes, standard invoices and miscellaneous invoices. The invoice number for all the above types must remain one series, so each time I want one of these I get the next record in the tblInvoices, whilstthe report behind these differs significantly. How can all these different invoices be produced but only originate from one series of numbers?. If that makes any sense!, does anyone have any ideas?

Thanks
Steph
 
Hi Steph,
I am not sure if this is what you are looking for, but you can use "filter" to take advantage of a single value (such as InvID) to generate multiple reports (e.g., rptCredit, rptStandardInvoice, etc.). Here is a sample of VBA code:

dim strFilter as string
strFilter = "[InvID] = '" & Me!InvID & "'"
DoCmd.OpenReport "rptCredit", acViewPreview, , strFilter
DoCmd.OpenReport "rptStandardInvoice", acViewPreview, , strFilter



By the way, I wrote an FAQ on the topic. Here is the link: faq703-2657 HTH,
Randy Smith
California Teachers Association
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top