send only one record to the report

K

Katie

i have a database of employee information and would like to create a report
so that i can print the employee information as a resume. i would like to be
able to search for the employee whose resume i want to create and then send
only that record to the report to print only 1 resume. any help?

katie
 
S

strive4peace

Hi Katie,

for the main report, you can use the WHERE clause of the OpenReport action

DoCmd.OpenReport reportname[, view][, filtername][, wherecondition]

for instance:
'~~~~~~~~~~~~~~~~~~~~
'save record if changes have been made
if me.dirty then me.dirty = false

if me.NewRecord then
msgbox "You are not on a record",,"Can't print"
exit sub
end if

DoCmd.OpenReport "ReportName", acPreview, , _
"IDField = " & me.ID_controlname
'~~~~~~~~~~~~~~~~~~~~


Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote programming and Training
strive4peace2006 at yahoo.com
*
 
Top