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

Print a report for single record

Status
Not open for further replies.

Leaner79

Programmer
Jan 17, 2006
25
BW
hi,
I'd like help with creating a report. I want it to have a report created for a single patient who is highlighted in a form
 
Can you be more specific? What exactly is it about creating the report that you need help with?

Have fun! :eek:)

Alex Middleton
 
This is my situation.
I have a form(Patient Form)with many subforms.
I want to create a button on the Patient form.
This button will generate a report for only the highlighted patient. The report should also include the information in the sub forms.
I hope i've explained myself better.
Thanx
 
Create a report exactly the same as the form, with all the same subreports as subforms, and the same query in the report. Create a button on the form and put your version of the following code (example only) in the On Click event:

Code:
Private Sub Button1_Click()
    Dim Condition As String
    Condition = "[PatientID] = " & Me.txtPatientID
    DoCmd.OpenReport "Report1", acViewPreview, , Condition
End Sub

The above is just an example and obviously control and report names should be chanegd to your specific case.

Have fun! :eek:)

Alex Middleton
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top