General discussion
-
Topic
-
Print report from Form in Access 2000
LockedI want to print a Report from a button located on a Form. The Report must be limited to the record currently displayed on the Form. There are two fields on the Form that control the data that is to be displayed in the Report: a “MRNumber” field in the parent form and a “visit date” field in the child form.
The Report is based on a query.
I am using the following syntax in a Print Report button on the Form:DoCmd.OpenReport stDocName, acNormal, , [MrNumber] = [Forms]![Patient Billing details]![MrNumber] And [Visit Date] = [Forms]![Patient Billing details]![Patient Billing sub1]![Visit Date]
The problem is the Report just ignores the Where clause and prints all records instead of the ones defined by the Form fields.
Do I need anything in the Query to allow it to accept the parameters of the Where statement?
Help!!