Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2000 Forms

Status
Not open for further replies.

AcornD

IS-IT--Management
May 22, 2002
37
GB
How do you create a button on an access form to print/ preview only the current record

Ie the record that i am working on and not all the records in the database.
 
Use the Where argument:

[tt]DoCmd.OpenReport "rptReport", , , "ID=" & Me.ID[/tt]
 
Have Type above and keep getting a compile error
Method or data member not found

DoCmd.OpenReport "report10", , , "ID=" & Me.ID

and it always highlights the .ID
 
I do not know what your fields and controls are, so ID is a generic name for an ID field and Me.ID is the matching control on your form. In addition, the example is for a numeric field. A text field would require single qotes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top