Results 1 to 2 of 2

Thread: Format Number

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2001
    Posts
    759

    Format Number

    Hi Everyone,

    I have a product ID number that looks similar to the following.

    1234 4351 0076 8902

    What I would like to do is format the number dynamically through code so that it displays like this on the form.

    xxxx xxxx xxxx 8902

    I would appreciate any help. Thank you.

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Format Number

    Originally posted by Ace
    Hi Everyone,

    I have a product ID number that looks similar to the following.

    1234 4351 0076 8902

    What I would like to do is format the number dynamically through code so that it displays like this on the form.

    xxxx xxxx xxxx 8902

    I would appreciate any help. Thank you.
    assuming it will always be the same length (credit card right??)
    VB Code:
    1. Dim str As String
    2. str = "1234 4351 0076 8902"
    3. MsgBox "XXXX XXXX XXXX " & Right(str, 4)

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