Re: printing a record in a form
Hi, I would create the report that you will print the same as you created the forms (i.e. report with a subreport)
Originally posted by cmthomps
I have a form with a subform in it. I am showing one record at a time in the main form and would like to print ONLY the shown record and not every record. Could someone please tell me how i can go about doing this? Thanks in advance.
Then you can create a command button in the form and do something like this:
stDocName = "yourReportNameHere"
stLinkCriteria = "[maintablename].[NameOfTablesKey]=" & Me![NameOfTablesKey]
DoCmd.OpenReport stDocName, acNormal, , stLinkCriteria
that way the report is opened only to the data specified in your linkCriteria which is the current Key value (one record).
Last edited by jameselmer; 02-21-03 at 14:28.
Clinical Programmer Analyst
Wellstat Biologics Corporation