[RESOLVED] Record Filter - last word
Hi ,
I have to filter the records based upon the last word of a field. I am doing the following
Code:
rec.Filter = "Category like *Instructions"
This is giving me an error.
However, the following line works
Code:
rec.Filter = "Category like *Instructions*"
But the problem is it returns me records even if the word Instruction is in the middle or somewhere else in the string. Is there any way to get me the required result.
Thanks
Re: Record Filter - last word
hi..
as per my knowledge..I think u have to use quotes
"... like "*instructions""
if not...can u please tell me what is the error u r getting...
could u give me a breif explanation...please..
Thanx & Regads
Anu..
Re: Record Filter - last word
Anu, if that is the case then the code
rec.Filter = "Category like *Instructions*"
should also not be working. But it is.
There is no error box. The execution arrow jumps out from this line when it tries to execute it.
Re: Record Filter - last word
ooopss...is it...????
then ..???
Y dont u build the recordset with the filter it self...what i mean to say is...
y dont we use..
VB Code:
set rec= .openrecordset( "select * from table where category like *instructions"
doesn't this server our purpose..????
thanx & Reagrds
Anu...
Re: Record Filter - last word
Anu, sorry for the late reply. Could not verify your solution yesterday as I had had trouble using openRecordset. Just tried it a few minutes back and it works! Thanks a lot.
I remember to rate your post
Re: [RESOLVED] Record Filter - last word