N
Nick T
Hi,
Have a form on which i have a cmd button. I want to click the button to
preview a report. Iv used the 'wizard' and got the following code:
Private Sub Command27_Click()
On Error GoTo Err_Command27_Click
Dim stDocName As String
stDocName = "Invoice"
DoCmd.OpenReport stDocName, acPreview
Exit_Command27_Click:
Exit Sub
Err_Command27_Click:
MsgBox Err.Description
Resume Exit_Command27_Click
End Sub
When i click the button, it askes me to enter my 'Invoice No' into another
window which 'pops up', however, i want the 'Invoice No' to match a text box
which is on my form. Why is this other window poping up, and any suggestions
around this prob??
Many thanks
Have a form on which i have a cmd button. I want to click the button to
preview a report. Iv used the 'wizard' and got the following code:
Private Sub Command27_Click()
On Error GoTo Err_Command27_Click
Dim stDocName As String
stDocName = "Invoice"
DoCmd.OpenReport stDocName, acPreview
Exit_Command27_Click:
Exit Sub
Err_Command27_Click:
MsgBox Err.Description
Resume Exit_Command27_Click
End Sub
When i click the button, it askes me to enter my 'Invoice No' into another
window which 'pops up', however, i want the 'Invoice No' to match a text box
which is on my form. Why is this other window poping up, and any suggestions
around this prob??
Many thanks