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

printing one record of a query

Status
Not open for further replies.

ytakbob

Programmer
Jul 20, 2000
105
US
I use a query to read from 2 tables.
Patient and patient orders.
from a form (patient information) and subform - order information..i enter my data and then would like to print just the information I entered on the current form and subform...rather than all the information (all patients and their orders)

Currently when I use openreport in a vbscript..I get all the records in the query printed

Bob Schmid
bob_schmid@hmis.org
330-746-1010 ext. 1347
 
Set a where condition in the OpenReport command

Code:
DoCmd.OpenReport "theReportName", acViewPreview, , "where Condition"

For your case, the where condition would be something like:

"PatientID = 1234"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top