Solved

access subform-printing one record

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

743 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

14 Experts available now in Live!

Get 1:1 Help Now