jamjawaller
IS-IT--Management
I'm sure this has been discussed before but I'm relatively new to VB scripting. I need to open a report from a form with a where clause. Here is what I have but I'm not sure how to word the where clause or where it goes. I want the report to open where the [Index] on the form is equal to the [Index] on the report.
Private Sub cmdPrintProposal_Click()
Dim rptContract As Access.Report
Dim strReportName As String
Dim aoAccessObj As AccessObject
DoCmd.OpenReport "rptContract", acViewPreview, WHERE
Forms![frmContract]![Index] = [Index]
End Sub
...please feel to make inputs on the proper code. Thanks in advance.
JAM
Private Sub cmdPrintProposal_Click()
Dim rptContract As Access.Report
Dim strReportName As String
Dim aoAccessObj As AccessObject
DoCmd.OpenReport "rptContract", acViewPreview, WHERE
Forms![frmContract]![Index] = [Index]
End Sub
...please feel to make inputs on the proper code. Thanks in advance.
JAM