Print specific record report with button on form

snorf3

Registered User.
Local time
Today, 10:18
Joined
May 25, 2001
Messages
45
I've read all the previous posts on this topic but they don't seem to work for me. Here's my problem:

I have a form set up that has PatientInfo in a main form and ClinicalInfo in a subform. I also have a report that has the PatientInfo as the main report and ClinicalInfo as a subreport.

I want to put a button on my form that will print the report containing the main PatientInfo and then the related ClinicalInfo. This is a many to one relationship with many Clinical records for each Patient record. I want to print a specific Clinical record for a specific Patient.

Thus, the actual record to be printed has 2 unique IDs: PatientID and VisitNo.

Any ideas how I can set up a print button that allows this to happen?
 
check help for:

OpenReport Action

hth,
al
 
how do i get the where condition to recognize two different fields (Health_Care_No and Visit_No) as the criteria to open the report?

This is what I have right now:

DoCmd.OpenReport (rptVisitSummary,acViewNormal,,[Health_Care_No]=Forms![Clinical assessment]![Health_Care_No] AND [Visit_No]=Forms![Clinical assessment]![Visit_No])

But I get an error message saying:

Compile error. Expected: = (Syntax error)

What do I need to fix in my code?

[This message has been edited by snorf3 (edited 06-18-2001).]
 

Users who are viewing this thread

Back
Top Bottom