Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    May 2001
    Location
    Maryland, USA
    Posts
    105
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Left Function (2000)

    I am running a macro that looks at a field to determine whether to open another form or not. I have two conditional actions that use the Left function. One looks for "14" as the first two numbers, this one works fine. However, I want the other one to look for "L" as the second character, so I've done this: Left([Forms]![FRM QA]![PART NUMBER],2)="#L". This is the same condition as the first one except for using a wildcard. This one doesn't work. Can anyone tell me why and if there's another way of doing this?

    Thanks.

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Left Function (2000)

    Why not use :
    Mid([Forms]![FRM QA]![PART NUMBER],2,1) = "L"
    Francois

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Left Function (2000)

    If you want to use Left the formula is :
    Left([Forms]![FRM QA]![PART NUMBER],2) Like "?L"
    Francois

  4. #4
    2 Star Lounger
    Join Date
    May 2001
    Location
    Maryland, USA
    Posts
    105
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Left Function (2000)

    Thanks for the reply. I tried both of these and they don't seem to want to work. It worked fine when I tried using the Mid function in a query - seems it should work here, but it's not.

  5. #5
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Left Function (2000)

    Can you post the cod you use to open the form (with the conditions) ?
    Francois

  6. #6
    2 Star Lounger
    Join Date
    May 2001
    Location
    Maryland, USA
    Posts
    105
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Left Function (2000)

    Boy, do I feel stupid. I had copied the condition, but forgot that it needed to check the lot number, not the part number. Sorry, but thank - I learned something new anyway.

  7. #7
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Left Function (2000)

    Don't feel stupid, we all do such little mistakes and sometimes they are the hardest to find.
    Francois

Posting Permissions

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