call report on record from form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I can open a report from the form but I only want to see the current record
on the report, not all of them. How do I call just the one record that is
current?
 
Use the open report command, and use the where condition to filter on the
current record

docmd.OpenReport "ReportName",,,"WhereCondition"
Can be
' If you filter on a number field
docmd.OpenReport "ReportName",,,"FieldNameInTable = " & FieldNameOnForm

' If you filter on a Text field
docmd.OpenReport "ReportName",,,"FieldNameInTable = '" & FieldNameOnForm & "'"
 
Back
Top