Results 1 to 2 of 2
2003-10-31, 15:01 #1
- 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?
2003-10-31, 15:08 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 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.