G
Guest
I have a form setup that allows the users control certain search criteria. I
am looking for away to allow the user to place multiple selects in one of
the text boxes on the form.
Example would be Tax Id (999999999,999999998,)
I need some direction on where to look for this. Attaching the code I am
trying to use now.
Thank you.
where = Null
where = where & " AND InParam([Service Tin])'" = Me![ServProv] + "'"
where = where & " AND [Service Suffix]= '" + Me![PrvSuffix] + "'"
where = where & " AND [Service Spec]= '" + Me![SevSpec] + "'"
If Not IsNull(Me![Pd To]) Then
where = where & " AND [chpddt] between " + _
Me![Pd From] + " AND " & Me![Pd To] & ""
Else
where = where & " AND [chpddt] >= " + Me![Pd From] _
+ " "
End If
If Not IsNull(Me![Inc To]) Then
where = where & " AND [chinfr] between " + _
Me![Inc From] + " AND " & Me![Inc To] & ""
Else
where = where & " AND [chinfr] >= " + Me![Inc From] _
+ " "
End If
If Not IsNull(Me![Rec To]) Then
where = where & " AND [chrcdt] between " + _
Me![Rec From] + " AND " & Me![Rec To] & ""
Else
where = where & " AND [chrcdt] >= " + Me![Rec From] _
+ " "
End If
Set MyQueryDef = MyDatabase.CreateQueryDef("qyr_1ServicePrvSelect", _
"SELECT * INTO Tbl_ServicePrvSelect FROM (clmdet LEFT JOIN
Tbl_ServiceProvAppend ON clmdet.cdspno = Tbl_ServiceProvAppend.[Service Seq])
LEFT JOIN clmhdr ON (clmdet.cdwkno = clmhdr.chwkno) AND (clmdet.cdclno =
clmhdr.chclno)" & (" where " + Mid(where, 6) & ";"))
am looking for away to allow the user to place multiple selects in one of
the text boxes on the form.
Example would be Tax Id (999999999,999999998,)
I need some direction on where to look for this. Attaching the code I am
trying to use now.
Thank you.
where = Null
where = where & " AND InParam([Service Tin])'" = Me![ServProv] + "'"
where = where & " AND [Service Suffix]= '" + Me![PrvSuffix] + "'"
where = where & " AND [Service Spec]= '" + Me![SevSpec] + "'"
If Not IsNull(Me![Pd To]) Then
where = where & " AND [chpddt] between " + _
Me![Pd From] + " AND " & Me![Pd To] & ""
Else
where = where & " AND [chpddt] >= " + Me![Pd From] _
+ " "
End If
If Not IsNull(Me![Inc To]) Then
where = where & " AND [chinfr] between " + _
Me![Inc From] + " AND " & Me![Inc To] & ""
Else
where = where & " AND [chinfr] >= " + Me![Inc From] _
+ " "
End If
If Not IsNull(Me![Rec To]) Then
where = where & " AND [chrcdt] between " + _
Me![Rec From] + " AND " & Me![Rec To] & ""
Else
where = where & " AND [chrcdt] >= " + Me![Rec From] _
+ " "
End If
Set MyQueryDef = MyDatabase.CreateQueryDef("qyr_1ServicePrvSelect", _
"SELECT * INTO Tbl_ServicePrvSelect FROM (clmdet LEFT JOIN
Tbl_ServiceProvAppend ON clmdet.cdspno = Tbl_ServiceProvAppend.[Service Seq])
LEFT JOIN clmhdr ON (clmdet.cdwkno = clmhdr.chwkno) AND (clmdet.cdclno =
clmhdr.chclno)" & (" where " + Mid(where, 6) & ";"))