Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Apr 2002
    Texas, USA
    Thanked 1 Time in 1 Post

    How to force N digits in a field (2000/2002)

    I have a table with 3 fields and each field stores part of the version number of a software program The fields are set to numeric. An example of what the software version number would look like is N.NNN.NN where N is any digit from 0 to 9. It works fine so long as no digit begins with a 0. So 4.45.41 stores with no problem but 4.05.05 does not get stored like this. The leading zero's are left out. I know I could switch these to character fields but would that be the best soloution and if I did that how could I prevent users from entering non-numeric values?


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: How to force N digits in a field (2000/2002)

    Do you mean that you have one field containing 4, another field containing 5 and a theird field containing 5? You can combine them like this:

    [Field1] & "." & Format([Field2],"000") & "." & Format([Field3],"00")

    If you want to work with text fields, you can use the Input Mask property to limit input to numeric characters. Click in the Input Mask property and press F1 to get detailed help.

Posting Permissions

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