Form Default Value Question

I understand the concept in creating a default value for new form records when the data type is text, but i can't seem to get the same default value to populate when the data type is number.  

For a text field under the form field's property sheet, i add the default in the default value with quotes around the value.  For instance "00000", but if i do the same thing for a number data type field is only inputs one zero?  What is the process for having multiple zero's populate as a default when the data type is number.  The zero's are proceeding to employee ids so i want them inputted so the complete naming convention is utilized when entering the remaining numbers.  

Thanks.
jsawickiAsked:
Who is Participating?
 
Rey Obrero (Capricorn1)Commented:
here is another way of doing it
open table in design view
select your number field
below, look for the format property and type  00000

now create a form bound to the table..
0
 
Rey Obrero (Capricorn1)Commented:
<What is the process for having multiple zero's populate as a default when the data type is number.>

if your intention is to have your field zero filled, you need to convert the field to string with

Format([NumberField],"000000")

or use a Data Type TEXT, not Number
0
 
jsawickiAuthor Commented:
So that code will go into the default value on the property Sheet under the data tab.  If so, i added it, changed the data type to number and left the field size long integer.  THe results was the field  populating with #Name?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Jeffrey CoachmanMIS LiasonCommented:
Then I am confused as to why you are asking about "default values", when your question appears to be about "Formatting"

In addition to what capricorn1 posted, you can also:

In the table, set the "Format" Property of this numeric field to: 000000
(Note that there are no quotes around the zeros)
Then any number you enter in the field will have the leading Zeros.
set the format propertyenter a valueformatted with leading zeros
JeffCoachman
0
 
Jeffrey CoachmanMIS LiasonCommented:
Ignore my post above, capricorn1 posted the same thing before I did, so he should get the points.

But my point is still valid.
This is "Formatting", it has nothing to do with "default values"

What you seem to be wanting here is a "Default Format", ...not a Default Value...

Jeff
0
 
jsawickiAuthor Commented:
Thanks all.  I was just trying to understand the possibility of entering a default value while using data type number and have realized that it works unless the numbers are all zeros then you have to convert to a string.  When it is zeros, it will only list one versus all that are listed.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.