- Local time
- Today, 13:18
- Joined
- Feb 19, 2013
- Messages
- 17,497
I have a form which is populated with a disconnected ADO recordset. In this particular application, I can't use a DAO recordset.
I'm trying to set up filter criteria and have hit a problem - see this link for background on ADO filtering
http://msdn.microsoft.com/en-us/library/windows/desktop/ms678073(v=vs.85).aspx
The problem is that I can set these filters
"Fld Like '*somevalue*'" i.e. return when somevalue is somewhere in fld
"Fld Like 'somevalue*'" i.e. return when somevalue is at the beginning of fld
But this doesn't work
"Fld Like '*somevalue'" i.e. return when somevalue is at the end of fld
According to the link this is supposed to be the case - you can have an * at the end, or the beginning and end, but not just the beginning.
Similarly, the 'Not' operator doesn't appear to work - not even mentioned in the link!
"Fld Not Like '*somevalue*'" i.e. return when somevalue is nowhere in fld
And although I'm not using it the ? wildcard doesn't appear to be available either.
So my question is - does anyone have any suggestions for a filtering workaround - without requerying the underlying recordset and applying the filter as criteria which has performance issues.
Thanks in advance
I'm trying to set up filter criteria and have hit a problem - see this link for background on ADO filtering
http://msdn.microsoft.com/en-us/library/windows/desktop/ms678073(v=vs.85).aspx
The problem is that I can set these filters
"Fld Like '*somevalue*'" i.e. return when somevalue is somewhere in fld
"Fld Like 'somevalue*'" i.e. return when somevalue is at the beginning of fld
But this doesn't work
"Fld Like '*somevalue'" i.e. return when somevalue is at the end of fld
According to the link this is supposed to be the case - you can have an * at the end, or the beginning and end, but not just the beginning.
Similarly, the 'Not' operator doesn't appear to work - not even mentioned in the link!
"Fld Not Like '*somevalue*'" i.e. return when somevalue is nowhere in fld
And although I'm not using it the ? wildcard doesn't appear to be available either.
So my question is - does anyone have any suggestions for a filtering workaround - without requerying the underlying recordset and applying the filter as criteria which has performance issues.
Thanks in advance