Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Filter with Multiple Values?

Status
Not open for further replies.

fperri

Programmer
Apr 25, 2007
8
US
Is it possible to have a filter that has more than one value? I cannot figure out how to code it correctly. THe following is what I have for one value.

Me.Filter = "DATATABLE.LenderCode = '" & Me.cboLenderCode & "'"

I did this for two values but it doesn't work.....

Me.Filter = "DATATABLE.LenderCode = '" & Me.cboLenderCode & "', DATATABLE.RegionCode = '" & Me.cboRegionCode & "'"
 
I also tried...

Me.Filter = "DATATABLE_WHOLESALE.LenderCode = '" & Me.txtLender.Value & "' AND DATATABLE_WHOLESALE.RegionCode = '" & Me.txtRegion.Value & "'"

But I get error "2001: You cancelled the previous operation.
 
What is the SQL code of the RecordSource property of the form you want to filter ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top