D
D.Sn
I have an Access 2000 database table that has a numeric field called
"Amount" in a table called STMASTER read by a query called qrySTMASTER that
queries the table STMASTER. "Amount" is numeric field in STMASTER.
I am creating a recordset object in VB6 to filter records in qrySTMASTER
which have the value 100 in the "Amount" field. I have created a field that
has the following string for the filter :
"[Amount] LIKE '%100%'"
I wish to get the recordset to return all values that have the string 100 in
the Amount field including values such as 100,2100,3100 etc.
However, I find that the above construct does not work when used as a filter
such as rs.Filter = "[Amount] Like '%100%'" but works fine when used in a
WHERE clause in an SQL statement.
I keep getting an error message that says " Run time
error -2147217825(80040e5f)
Filter Cannot be opened"
The filter "[Amount] LIKE '100'" works fine and returns all records with
"100" in the [Amount] field but does not return "2100" , "3100" etc.
Any idea why this is happening and how I get around it?
Thanks,
D.Sn.
"Amount" in a table called STMASTER read by a query called qrySTMASTER that
queries the table STMASTER. "Amount" is numeric field in STMASTER.
I am creating a recordset object in VB6 to filter records in qrySTMASTER
which have the value 100 in the "Amount" field. I have created a field that
has the following string for the filter :
"[Amount] LIKE '%100%'"
I wish to get the recordset to return all values that have the string 100 in
the Amount field including values such as 100,2100,3100 etc.
However, I find that the above construct does not work when used as a filter
such as rs.Filter = "[Amount] Like '%100%'" but works fine when used in a
WHERE clause in an SQL statement.
I keep getting an error message that says " Run time
error -2147217825(80040e5f)
Filter Cannot be opened"
The filter "[Amount] LIKE '100'" works fine and returns all records with
"100" in the [Amount] field but does not return "2100" , "3100" etc.
Any idea why this is happening and how I get around it?
Thanks,
D.Sn.