Results 1 to 3 of 3
  1. #1
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544

    Question Checking for trailing letter

    I know there must be an easier way to do this, but this is the only way I currently know. I want to check to see if the 4th character in an account number is a letter. The string could be five or six characters, but the first three characters are always numbers. There is a possibility that the 4th character is a number, and if that is true I want to pass it through. This is what I have so far in my query, but this does not check if the 4th character is a letter or not, just if the string is greater than three characters....


    Code:
    IIf([OutstandingAR]![AcctNo]>Mid([OutstandingAR]![AcctNo],1,3), IIf([OutstandingAR]![Tax]>0.001, IIf([OutstandingAR]![Balance]>0.001,[OutstandingAR]![AcctNo],""),""),[OutstandingAR]![AcctNo])
    Any suggestions are welcome. Thank you.

  2. #2
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Correction....I need to check to see if the last character is an Alpha character, not the 4th character.

  3. #3
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    I used the expression:
    Code:
     ReturnAlpha: IsNumeric([AcctNo])
    and put "False" in the criteria field.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 03-06-2010, 01:11 PM
  2. Automated Letter Composition
    By jmwheatley in forum Programming
    Replies: 7
    Last Post: 09-20-2009, 05:20 PM
  3. Replies: 9
    Last Post: 07-16-2009, 09:13 PM
  4. From letter from a report
    By LANCE in forum Reports
    Replies: 4
    Last Post: 07-04-2009, 09:32 AM
  5. Checking for Value in Query
    By jgelpi in forum Access
    Replies: 1
    Last Post: 06-24-2009, 04:57 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums