SnapShot

D

Dar

I have a command button on a form which will output a report to a specific
folder in Snapshot format. The form has a text field identifying a
particular patient. The user may input for several patients and needs to
send a separate report for each. While the command button works, the reports
are overwritten each time the user exports to folder.
What is the code to tell the output to name the report based on text field?
I am using the DoCmd.Output to etc.
Thanks in advance
 
J

Jeanette Cunningham

Dar,
first you will need code to build the report name for each report. The code
will retrieve the Patient name from the form and use that to build the
report name.

something along the lines of
Dim strReportName as String
strReportName = "Report" & me.txtPatientName

where txtPatientName is the name of the control on your form with the
details of the patient's name

The help on DoCmd.Outupt shows how to specify the name of the export file.

Jeanette Cunningham
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top