Printing a specific record

  • Thread starter Thread starter chery11
  • Start date Start date
C

chery11

I have a form and I want to create a button that when I select it only prints
that person's particular information to a report that I have set up.
 
Chery11,

Easy enough to do except you didn't say how the report will know who to
print. Is there a combo box or text box where the person selects their
name? And is that field numeric or text?

Numeric...

DoCmd.OpenReport "YourReportName", acPreview, , "[PrimaryKey]=" &
Me.FieldOnForm

Text...

DoCmd.OpenReport "YourReportName", acPreview, , "[PrimaryKey]= ' " &
Me.FieldOnForm & " ' "

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
Back
Top