• taking out a character (Access2000 SR1a)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » taking out a character (Access2000 SR1a)

    • This topic has 2 replies, 3 voices, and was last updated 23 years ago.
    Author
    Topic
    #369479

    I am working on a form where we will imput barcodes and sku #. I have a combo box where I will enter in the barcode from a handheld scanner. The scanner is programmed to put a semicolen ( in front of the barcode number so that another program we use can tell that it’s a barcode number and not a sku#. For this application, I need to take out the semicolen before the combo box is updated. What code would I use to do that?

    Viewing 1 reply thread
    Author
    Replies
    • #581876

      The MID functions returns a specific number of characters from a text string starting at the position you specify. So try :

      MID(yourtext,2,numberofchars)

      If there are both SKUs and barcodes in this field, you may have to first test that the initial character is a semicolon and you may have to first count the number of characters for the field if they are of variable length. The LEN function will do this.
      HTH

    • #581878

      Another option where the semi colon is at the front would be as follows:
      Right([YourField],Len([Yourfield])-1)

    Viewing 1 reply thread
    Reply To: taking out a character (Access2000 SR1a)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: