(Q) I'm trying to print out only the current record from my form in a report but each
time all the records print out. How can I print only one record using a report?
(A) Use the OpenReport's Where condition to specify your record. For example, the
following code placed behind a command button on the form would use the RunID control on
the form to restrict the Report to only one record.
Dim strDocName As String
Dim strWhere As String
strDocName = "rptSomeReport"
strWhere = "[RunID]=" & me!RunID
DoCmd.OpenReport strDocName, acPreview, , strWhere
|