Default Value

N

Novice2000

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
 
K

Ken Snell \(MVP\)

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.
 
N

Novice2000

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.
 
K

Ken Snell \(MVP\)

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.
 
N

Novice2000

Thanks, but I need for it to display 0.00 before a value is entered. These
are not new records.
 
K

Ken Snell \(MVP\)

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.
 
K

Ken Snell \(MVP\)

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"
 
N

Novice2000

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.
 
K

Ken Snell \(MVP\)

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!
 
Top