Solved

access subform-printing one record

Posted on 2013-01-08
3
416 Views
Last Modified: 2013-01-09
I have one table Clients and this has a relationship to Files.
One client can have many files.

I have a subform Files on the main form Clients


What I would like to do to is to print the contents of one record of the sub form.

I need to make a report, prob based on a query and then have a filter in the report to filter one client AND that particular file
So as to print all the clients details and the details for ONE file.
Ideally select the file record from a double click from the file records.

Assistance please appreciated.
0
Comment
Question by:topUKlawyer
  • 2
3 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 250 total points
ID: 38755778
you just need to add filter to your report record source

where [client]=Forms!MainForm!Client and [File] =Forms!MainForm!SubformControlName.Form.[File]
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 250 total points
ID: 38755882
Create a report based on the files Table

Put a button on the  subform to print the report based on the selected "File"
Code would be something like this:

Private Sub Command0_Click()
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "rptFiles", acViewPreview, , "FileID=" & Me.FileID
End Sub

JeffCoachman
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38755937
Something like this:
Database181.mdb
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now