G
Guest
I've created a button to open a report based on the Invoice Number on the
form. THe code looks like this:
Dim stDocName As String
Dim strLocate As String
stDocName = "rptInvoice"
strLocate = "[tblInvoice.lngInvoiceNo]=" & Me.lngInvoiceNo
DoCmd.OpenReport stDocName, acPreview, , strLocate
Trouble is when I click on the button, there is a Enter Parameter Value
dialog box for tblInvoice. It's can't seem to recognize the
[tblInvoice.lngInvoiceNo]. However, if I just click on OK on the EPV dialog
box without entering, the report still opens correctly. Is there something
wrong with the code? Thanks.
ck
form. THe code looks like this:
Dim stDocName As String
Dim strLocate As String
stDocName = "rptInvoice"
strLocate = "[tblInvoice.lngInvoiceNo]=" & Me.lngInvoiceNo
DoCmd.OpenReport stDocName, acPreview, , strLocate
Trouble is when I click on the button, there is a Enter Parameter Value
dialog box for tblInvoice. It's can't seem to recognize the
[tblInvoice.lngInvoiceNo]. However, if I just click on OK on the EPV dialog
box without entering, the report still opens correctly. Is there something
wrong with the code? Thanks.
ck