Default Value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

This is something I should probably know by now, but I can't figure out how
to make my currency field default to 0.00. When I enter it it changes back
to 0, and the field themselves are null. Am I missing something? Thanks
 
If you enter a zero, you're saying that the field then shows "empty" after
you've finished the editing? I think we need much more detail about your
setup and what you're doing -- there must be more "going on" here than what
you've posted so far.
 
It's just an ordinary table. There are dollar amounts entered under a column
called 08 Fees. I want this to show as 0.00 before anything is entered. When
I choose 2 as the decimal places the fields are still shown as blank.
 
Set the Default Value property of the field to 0 in the table's design view.
Note that this default value will be put into the field only when a new
record is being created; it will not fill in the field's value in existing
records.
 
Thanks, but I need for it to display 0.00 before a value is entered. These
are not new records.
 
If there is no value in the field, and it's not a new record, ACCESS will
not be able to write a zero into it unless you program the form to write a
zero value into that field if there is no value in that field already.
 
Actually, there is a way to use the Format property of the field to do this.
The fourth argument for the Format of a field is what you want to show if
there is a Null value in the field. Put the following in the Format property
of the field when in table design view:

;;;"0.00"
 
Thank you Ken. I have made a note of that. What I did was set each field to
default to "0" as you said, when a new record is entered, and since it was a
new field without any data in it yet for the old records, I created a column
of 0.00 in Excel and pasted it into Access to populate the remaining fields.
It may not be pretty, but it worked.
 
Just to clarify my comment about Format property (I reread it and it may be
misleading to other readers):

Using the Format property is just for display purposes; it will not cause a
value to be written into the field.

Glad things are working now!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top