Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2005
    Posts
    8

    Unanswered: display only the right half of text

    Help,
    probably a simple mistake. Trying to take a text field containing numbers in a query for a combobox. The number is 9 characters and I wish to display only the last 4. Using help and the net I have found:

    last4: Right([SSN], 4)

    but it alwayds returns an error that "...omitted an operand or operator..invalid character or comma...quotation marks..."

    using Acess 2000 in English on a computer with Win2K in German. It has brought problems before, but this should work, right?

    steven

  2. #2
    Join Date
    Feb 2005
    Location
    England.
    Posts
    232
    The code should work fine. You could try this instead to see if it gets you up and working...

    last4: Mid([SSN], 9, 4)

    Perhaps the issue is the ',' as the german W2K is interpriting it as something different?

    HTH.

  3. #3
    Join Date
    Nov 2002
    Posts
    272
    Quote Originally Posted by daveo61
    Perhaps the issue is the ',' as the german W2K is interpriting it as something different?
    You may be on to something. Possibly, the comma is configured to be the decimal point (it's a European thing...), and the semicolon ( should be used to separate arguments in VBA.

  4. #4
    Join Date
    Oct 2005
    Posts
    8
    Well got it.
    Need a semicolon; instead of a comma. Guess it is a language thing.
    Everything written in VBA works just fine though.

Posting Permissions

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