What do you mean by record number? There are no record numbers in Access.
If you mean the number you see in the box between the navigation buttons on
a form, those numbers just represent the ordinal position of the record
within the form's current recordset. They cannot be depended on. Any time
you filter a form, add a record, delete a record, or change the form's order,
the number will change. Normally, you would want to use some unique field in
the form's recordset to indentify a record. Then you can use the Where
argument of the OpenReport method to filter the report to that one record.
For example, say you have a customer form and the customer table has a
CustomerID primary key field, it would be:
Docmd.OpenReport "CustomerReport", , , "[CustomerID] = " &
Me.txtCustomerID
--
Dave Hargis, Microsoft Access MVP
Amanda said:
I'm new to access. I would like to put a command button to print a selected
record buy it asking me what record # do you want to print. I can't seem to
get this to work. Thank you in advance.