peispud
asked on
Select statement with exact match on record field with multiple items (comma delimited)
In my table, I have a field [tbl Eqp Filters].[Eqp Type] {string}
In one of the records, the field contains the following data.
if strEQPType = "TT50-SR1" , no records would be found.
if strEQPType = "TT50-SR12 " then the record the record is found.
The code below not work correctly.
Set rs = dbs.OpenRecordset("Select * from [tbl Eqp Filters] where [EQP Type] like '" & strEQPType & "'")
Any help would be appreciated.
Thank you.
In one of the records, the field contains the following data.
[tbl Eqp Filters].[Eqp Type] = TT50-SR12 , TT50-SR12fe
I would like a select statement that could find this record to match on exact matches on this list.if strEQPType = "TT50-SR1" , no records would be found.
if strEQPType = "TT50-SR12 " then the record the record is found.
The code below not work correctly.
Set rs = dbs.OpenRecordset("Select * from [tbl Eqp Filters] where [EQP Type] like '" & strEQPType & "'")
Any help would be appreciated.
Thank you.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
what do you mean didnt work?
ASKER
HI.
The attachment is a small Microsoft Access database to demonstrate the problem.
I've included the SQL select statement statement that you provided in the code as part of the application.
The database has one record. The [Eqp Type] value for this record is
Using the code provided, I cannot find the record where [Eqp Type] contains "TT50-SR12"
Test-SQL.accdb
The attachment is a small Microsoft Access database to demonstrate the problem.
I've included the SQL select statement statement that you provided in the code as part of the application.
The database has one record. The [Eqp Type] value for this record is
TT50-SR12 , TT50-SR12fe
Using the code provided, I cannot find the record where [Eqp Type] contains "TT50-SR12"
Test-SQL.accdb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER