Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print just one record from a form

Status
Not open for further replies.

emzadi

IS-IT--Management
Feb 13, 2001
69
US
Ok, I want to cry.

I followed the instructions at this link:

to print just one record from a form...

Everything was fine, then 10 minutes later, I started getting an "on click" error... "Procedure declaration does not match description of event or procedure having the same name."

Here is my code...

Private Sub cmdPrintForm_Click()
On Error GoTo Err_cmdPrintForm_Click

DoCmd.OpenReport "PrintForm2", acViewNormal, , "RegNumber=Forms!Main Screen!RegNumber"

Exit_cmdPrintForm_Click:
Exit Sub

Err_cmdPrintForm_Click:
MsgBox Err.Description
Resume Exit_cmdPrintForm_Click

End Sub

What have I done wrong?

Susan M. Wagner
LAPELS
susanw@lapels.com
 
"RegNumber=Forms!Main Screen!RegNumber" is suspect with space as part of form name.

Try "RegNumber=Forms![Main Screen]!RegNumber"


Dave

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top