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

Subform data selection for report

Status
Not open for further replies.

DajOne

Technical User
Jun 11, 2002
146
CA
(If I already posted this I am sorry, It does not show on my thread list by I am sure I did.. well)

My goal is to have the user print a report from the data selectioned on a subform from the 'customer number' located on the main form... In other words

The user selects a customer number on the main form, which displays data on that customer.
The subform (on a tab control)performs a query and displays a list of customer numbers and data related to these clients...
I need the user to click on a button located on the same tab to print the subform data ...

I can do the report with SELECT DISTINCTROW but the data is not limited to the customer number on the main form.. I tried boormark to select the current record to no avail...

Anyone has an idea on what command I can use?

Thanks
 
Have you tried using the Customer Number on the main form as criteria for the report you wish to generate in the report's underlying query?

Something like =forms!Mainform.txtCustomerNo

If you right click in the critera area and invoke the expression builder you can get the criteria correct.
 
So far I am baffled... Thanks for the tip!. I cannot find the criteria area you describe....

Still trying though!!!
 
Well, I got it to work...thanks for the idea of looking at an creating an expresion inside the underlying query...

Thanks again...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top