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

Filtered Record to One Single Report

Status
Not open for further replies.

sandra45

Technical User
Apr 3, 2003
72
ID
Hi, I have two tables: Invoice and Project. These 2 tables are linked by Project No field which is unique.

I have one form which provides several text boxes for user to type in data related to table Invoice and Project. E.g. if user types in 13 for Project No field, then the find function will show up records obtained from both tables with project no 13. Records filtered are shown in different form (ResultForm).

I want to put one command button in ResultForm to generate report to preview records filtered but I have a problem with it. The report is only showing the current record in the current state of the form (Form_Current()), so the next record filtered is not covered in the report.

Anybody can help me please? If the find form generates 3 filtered record obtained from two tables, how to have one report with one single command button from the form where the filtered records are shown, irrespective if each filtered record is shown in different Form_Current state (need to navigate the record with navigation button from one to three). Thank you very much. I really need help on this issue.

Regards,
Sandra
 
Hi Sandra,
You need to base your report off the query that is being used to populate the "ResultForm" as this has the multiple records that you require.
If the report is based on this query then the command button only needs to activate the report and print it.
 
Hi Trendsetter, thanks for your reply. My find form is consisting on unbound text boxes, the users put as many information as they know to narrow down the search result. I have all sql code in the background to show the result in ResultForm. The find form does not base on any query or tables.

Anyway, I guess it should be easier if I create another separate new form to enable user to choose record to filter. Another unbound control in this new form (let's say Frm_FilterRecord). I will put one combo box for user to choose as the input for filtering, can be Invoice number, or Invoice due date, or etc from table Invoice or Worksheet Number or Client Name or etc from table Project. After the user chooses one, then they will click one command button to filter and preview report for all results found. I have tried to create one query for this purpose, but how to pass this item chosen by the user back to the query and generate the report? I'm stuck here. Can you give me the codes also? Thanks a lot.

Regards,
Rita
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top