Solved

access subform-printing one record

Posted on 2013-01-08
3
418 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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

825 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