Great Day, I am trying to open a report with the following condition:
stFilter = "CustomerID=" & Me.CustomerID & " AND [RepairOrderID] = " & Me.tblRepairOrder.RepairOr
As noted above, I only want records that include the RepairOrderID for a specific customer. However, I am getting the following error when the form loads:
'Compile error: Method or data member not found'
If I shorten the filter to only include CustomerID, I do not get the error.
Private Sub btnOpen_Report_Click()
Dim stDocName As String
Dim stFilter As String
Dim stDateRange As String
stDocName = "rptInvoice"
stFilter = "CustomerID=" & Me.CustomerID & " AND [RepairOrderID] = " & Me.tblRepairOrder.RepairOrderId
DoCmd.OpenReport stDocName, acPreview, WhereCondition:=stFilter