I have a report that is launched (preview) from a push button in a "Report Center" form. I am trying to get a promt for the user to enter the ID number of the record stored in a table (CAGECOUNT).
The value I enter in the prompt has no effect, opens same report each time.
Any ideas what is wrong with my code?
I am learning fast so please be patient.......
Private Sub Command36_Click()
On Error GoTo Err_Command36_Click
Dim stDocName As String
stDocName = "rptWindowCount"
DoCmd.OpenQuery "qryCashierWindow"
DoCmd.OpenReport stDocName, acPreview
DoCmd.OpenReport "rptWindowCount", acPreview
Exit_Command36_Click:
Exit Sub
Err_Command36_Click:
MsgBox Err.Description
Resume Exit_Command36_Click
End Sub
The value I enter in the prompt has no effect, opens same report each time.
Any ideas what is wrong with my code?
I am learning fast so please be patient.......
Private Sub Command36_Click()
On Error GoTo Err_Command36_Click
Dim stDocName As String
stDocName = "rptWindowCount"
DoCmd.OpenQuery "qryCashierWindow"
DoCmd.OpenReport stDocName, acPreview
DoCmd.OpenReport "rptWindowCount", acPreview
Exit_Command36_Click:
Exit Sub
Err_Command36_Click:
MsgBox Err.Description
Resume Exit_Command36_Click
End Sub