send only one record to the report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top