I have a form that I use for entering data. One of the fields in each record is an autonumbered field called "RecordID."
There is a button on the form that (on click) executes a VBA script that saves the current record and then executes a command to print a report containing the data from a single record. That report is, of course, based on a query.
Currently, the criteria parameter for the RecordID field of that query is "[Enter ID:]" which requires the user to manually enter the RecordID of the current record.
I used "Me.RecordID" in the VBA script to store the RecordID of the current record as a variable called "CurrentRecordID". However, I cannot figure out how to get the query to recognize CurrentRecordID as a valid criteria parameter under RecordID.
Am I on the right track? I would appreciate any help with this.
There is a button on the form that (on click) executes a VBA script that saves the current record and then executes a command to print a report containing the data from a single record. That report is, of course, based on a query.
Currently, the criteria parameter for the RecordID field of that query is "[Enter ID:]" which requires the user to manually enter the RecordID of the current record.
I used "Me.RecordID" in the VBA script to store the RecordID of the current record as a variable called "CurrentRecordID". However, I cannot figure out how to get the query to recognize CurrentRecordID as a valid criteria parameter under RecordID.
Am I on the right track? I would appreciate any help with this.