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

How to loop a report

Status
Not open for further replies.

bosk00

Technical User
Mar 5, 2004
91
US
I have a form that prints a report from entering a companies UC#. The reports are specific to the state that the company is in. The following code is on the on_Click property of a button on the form
Code:
    Dim varx As Variant
    varx = DLookup("[SLSTATE]", "TDNR")
        
    DoCmd.OpenReport varx, acNormal
TDNR is a query that looks up the needed information. This works good, but is limited to entering the numbers one at a time. I have written a new query that will give a list of all the companies at once, how would I change the above code to print a report for each company returned.

Thanks

Alan
Senility at its finest
 
HI,
You may want to look at my FAQ's on how to use a form to help the user select criteria:
faq703-2696 Use a form and query to send criteria
faq703-2657 Use "filter" to send .....

HTH, [pc2]
Randy Smith, MCP
rsmith@cta.org
California Teachers Association
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top