Print Report of Current Record in form

  • Thread starter Thread starter Susan
  • Start date Start date
S

Susan

I have command button OnClick has event procedure of code
below. Just want the current record to print using the
Report. When I click the button, it asks for Parameter
Value... what am I doing wrong?

Dim strDocName As String
strDocName = "Spec Sheet"
DoCmd.OpenReport strDocName, acViewNormal, , "KitID = " &
Me.KitID

Hope someone can help me!
 
Try this:
DoCmd.OpenReport strDocName, acViewNormal, , "[KitID] =
Forms![YourFormName]![KitID]"
or maybe its just the quotes....
Damon
 

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