Tech Support Guy banner
Status
Not open for further replies.

Access DataBase

747 views 1 reply 2 participants last post by  Ziggy1 
#1 ·
I have an access database, one of the forms I am working with has a subform. I want to be able to print part of the main form, and parts of the suboform. I can do this by inserting the form key number and the subform key number, then it prints what I want. What I am looking for is to be able to be in a clients record and push print and without having to enter anything it prints the fields in the form and the subform that I have in a report. I hope this makes sense. Is there a macro that I can put together to do this?

Thank you in advance for any help. .
Chad
 
#2 ·
The simplest way although it may not seem like it, is to do the following:

Create a Join Query that includes both tables/queries (whatever your using), and create Joins on the 2 Key fields (related), this query should then become the control source for you report.

Now in the new query go to the field that contains the data you will be selecting on the form. eg the ID for the Main form

In the criteria row right click and select Build, find your form and find the Id field control name. The syntax will be:

[Forms]![FormName]![ControlName]

Now if you don't already have one, place a button on your form that opens the Report or query, it should only display the records for the selected records.

This called "Filter by Form"

Any problems let me know I or some one else can walk you through, it works I use it all the time.
 
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top