Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Arlington, Texas, USA
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Parsing in MS Access 2000 (MS Access 2000 )

    How do I return the middle letter or character of a 3 character set. in other words, if string is ABC how do I return just 'B'?? Thanks shihalud

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Parsing in MS Access 2000 (MS Access 2000 )

    It's the same as in any of the other Office apps, Mid(strSomething,2,1). That assumes that strSomething is a string variable that holds the string you want to use. If you're doing this from a query, it would be Mid([fieldname],2,1), where fieldname represents the name of the field in the query. This assumes there are always 3 characters in the field or string. If that is not always true, you're still going to get the second character unless the string or field is empty or has only one character in it.
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Arlington, Texas, USA
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Parsing in MS Access 2000 (MS Access 2000 )

    Thanks - i had tried this but was using the Mid$() and could not get it to work, this works fine thanks. shihalud

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Parsing in MS Access 2000 (MS Access 2000 )

    Mid$ should work the same way using the same syntax. What kind of error did you get.
    Charlotte

  5. #5
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Arlington, Texas, USA
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Parsing in MS Access 2000 (MS Access 2000 )

    I got it to work, I was using the improper syntax. Thanks

Posting Permissions

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