|
-
Aug 30th, 2005, 11:45 PM
#1
Thread Starter
Member
[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
When you know you can do it, there is no power on earth that can stop you. 
-
Aug 31st, 2005, 04:17 AM
#2
-
Aug 31st, 2005, 04:29 AM
#3
Thread Starter
Member
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.
When you know you can do it, there is no power on earth that can stop you. 
-
Aug 31st, 2005, 04:45 AM
#4
Hyperactive Member
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...
The Difference between a Successful person and others is not a Lack of Knowledge,
But rather a Lack of WILL 
-
Aug 31st, 2005, 08:52 PM
#5
Thread Starter
Member
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
When you know you can do it, there is no power on earth that can stop you. 
-
Sep 1st, 2005, 12:02 AM
#6
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|