Leventcos21
Technical User
Hi,
I have a filter of employee names that belongs to a form/subform. The employee names are a subform and sometimes there maybe 1,2,3 names in that subform.
I am trying to print out a report that selects a name from a combobox. I am only trying to print the records of the employee that are on the subform 1 record.
What I am getting is the employee in either 1, 2, or 3.
When I run the query with the employee's IDnumber, I get the result that I want. Here is the code for the unbound form that is doing the filter. Thank you in advance
If Not IsNothing(Me.cboProcess) Then
' .. build the predicate - must use subquery
varWhere = (varWhere + " AND ") & "(NcrNumber IN " & _
"(SELECT NcrNumber FROM tblOwnerDetail WHERE " & _
"ProcessID = " & Me.cboProcess & "))"
End If
I have a filter of employee names that belongs to a form/subform. The employee names are a subform and sometimes there maybe 1,2,3 names in that subform.
I am trying to print out a report that selects a name from a combobox. I am only trying to print the records of the employee that are on the subform 1 record.
What I am getting is the employee in either 1, 2, or 3.
When I run the query with the employee's IDnumber, I get the result that I want. Here is the code for the unbound form that is doing the filter. Thank you in advance
If Not IsNothing(Me.cboProcess) Then
' .. build the predicate - must use subquery
varWhere = (varWhere + " AND ") & "(NcrNumber IN " & _
"(SELECT NcrNumber FROM tblOwnerDetail WHERE " & _
"ProcessID = " & Me.cboProcess & "))"
End If