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

Sending Query Info to a report

Status
Not open for further replies.

Toga

Technical User
Jul 21, 2000
234
0
0
US
When you've brought data in to a spreadsheet or form view where you can apply filters & sort anyway you want....to send that sorted / filtered data to a report. In other words, report format will remain the same but I never know how the user might sort / filter the fields I've provided for him.....and I only want the filtered down data to go to the report.
 
Hi,

If I'm understanding your question correctly, it seems like you could just apply the filter in your openreport statement like this (the filter comes after the acViewPreview). This is an example from a report I was trying to open where I was trying to filter based on a starting and ending catalog number.

DoCmd.OpenReport &quot;BillofMaterials&quot;, acViewPreview, &quot;[BillofMaterials.Catalog]>=&quot;&quot;&quot; & StartingCatalog & &quot;&quot;&quot; AND [BillofMaterials.Catalog]<=&quot;&quot;&quot; & EndingCatalog & &quot;&quot;&quot;&quot;

Hope this helps.
mishmish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top