I have a little problem when I try to print a current record from the invoice form.
When I click the "Print Invoice", pop-up box showes up and it askes me "Enter Parameter Value. InvBase No".
I hit the Invoice No then report form shows up but not the current record. It brings the first record.
I need someone's help...
My code are following.
Private Sub prtInvoice_Click()
On Error GoTo Err_prtInvoice_Click
Dim stDocName, stWhere As String
stWhere = "[InvBaseNo]=[Forms]![frmInvoice]![InvBaseNo]"
stDocName = "rptInvoice"
DoCmd.OpenReport stDocName, acPreview, "", stWhere
Exit_prtInvoice_Click:
Exit Sub
Err_prtInvoice_Click:
MsgBox Err.Description
Resume Exit_prtInvoice_Click
End Sub
When I click the "Print Invoice", pop-up box showes up and it askes me "Enter Parameter Value. InvBase No".
I hit the Invoice No then report form shows up but not the current record. It brings the first record.
I need someone's help...
My code are following.
Private Sub prtInvoice_Click()
On Error GoTo Err_prtInvoice_Click
Dim stDocName, stWhere As String
stWhere = "[InvBaseNo]=[Forms]![frmInvoice]![InvBaseNo]"
stDocName = "rptInvoice"
DoCmd.OpenReport stDocName, acPreview, "", stWhere
Exit_prtInvoice_Click:
Exit Sub
Err_prtInvoice_Click:
MsgBox Err.Description
Resume Exit_prtInvoice_Click
End Sub