Results 1 to 2 of 2

Thread: Access Query: Field Code Help

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2001
    Posts
    142

    Unhappy Access Query: Field Code Help

    Here are examples of my field data.

    MARTIN SMITH/1880681/ITD/FED
    JACK JACKSON
    and I also have null values

    When I do my make table query I need it to do the following.
    If Null (or blank) put in the word "NONE"
    Otherwise all I need are the first and last name.

    Here is what I have so far but errors due to some names not having the "/" in them.

    TeamManager:If(IsNull([gWEBFollowUpResponsibility]),"NONE",Left([gWEBFollowUpResponsibility],InStr([gWEBFollowUpResponsibility],"/")-1)

    Thanks for any help
    Garrett

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Access Query: Field Code Help

    In that case try using an extra If, eg:

    If(IsNull([gWEBFollowUpResponsibility]),"NONE",If(InStr([gWEBFollowUpResponsibility],"/")>0,Left([gWEBFollowUpResponsibility],InStr([gWEBFollowUpResponsibility],"/")-1))

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