Results 1 to 6 of 6

Thread: [RESOLVED] Record Filter - last word

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2005
    Location
    NTU, Singapore
    Posts
    42

    Resolved [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.

  2. #2
    Hyperactive Member nagasrikanth's Avatar
    Join Date
    Nov 2004
    Location
    India,Hyderabad.
    Posts
    420

    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..
    The Difference between a Successful person and others is not a Lack of Knowledge,
    But rather a Lack of WILL

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2005
    Location
    NTU, Singapore
    Posts
    42

    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.

  4. #4
    Hyperactive Member nagasrikanth's Avatar
    Join Date
    Nov 2004
    Location
    India,Hyderabad.
    Posts
    420

    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:
    1. 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

  5. #5

    Thread Starter
    Member
    Join Date
    Aug 2005
    Location
    NTU, Singapore
    Posts
    42

    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.

  6. #6
    Hyperactive Member nagasrikanth's Avatar
    Join Date
    Nov 2004
    Location
    India,Hyderabad.
    Posts
    420

    Re: [RESOLVED] Record Filter - last word

    great memory power...
    The Difference between a Successful person and others is not a Lack of Knowledge,
    But rather a Lack of WILL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width