[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Form Default Value Question

Posted on 2012-09-04
Medium Priority
Last Modified: 2012-09-04
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.  

Question by:jsawicki
  • 2
  • 2
  • 2
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 38365498
<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


or use a Data Type TEXT, not Number

Author Comment

ID: 38365603
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?
LVL 120

Accepted Solution

Rey Obrero (Capricorn1) earned 2000 total points
ID: 38365646
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..
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38365731
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
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38365744
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...


Author Closing Comment

ID: 38365816
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.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question