printing one record

R

reportyemi

I have created a report (called labor_report) of each record and would like
to be able to print one record at a time. When open the report, all the
reports are seen following each other. And so when i print from the form,
all the reports are printed. I just want the one to print that i look at
currently.

i have my event code below. When i click, nothing happens.

Private Sub print_button_Click()
Dim strlabor_record As String
Dim strWhere As String
strDocName = "rptSomeReport"
strWhere = "[maternal_ID]=" & Me!Maternal_ID
DoCmd.OpenReport strlabor_record, acPreview, , strWhere

End Sub

Please some advice please

yemi
 
F

fredg

I have created a report (called labor_report) of each record and would like
to be able to print one record at a time. When open the report, all the
reports are seen following each other. And so when i print from the form,
all the reports are printed. I just want the one to print that i look at
currently.

i have my event code below. When i click, nothing happens.

Private Sub print_button_Click()
Dim strlabor_record As String
Dim strWhere As String
strDocName = "rptSomeReport"
strWhere = "[maternal_ID]=" & Me!Maternal_ID
DoCmd.OpenReport strlabor_record, acPreview, , strWhere

End Sub

Please some advice please

yemi

DoCmd.OpenReport stDocName, acPreview, , strWhere
 

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

Top