Change Default Number

R

rico

Does anyone know if you can change the default of the default value for a
number field from 0 to null?

Cheers

Rico
 
F

Fred Boer

Dear rico:

When you create a number field in Access, the field is given the default
value of "0". Ensure that the default value setting for the field is blank,
and then any new records will have a null value in that field. You change
this value in the table design view. If you need help to do this, post back!

Please note that this will only affect *new* records, it will not modify the
existing values in the table. For that you would use an update query.

HTH
Fred Boer
 
R

rico

Sorry did not explain myself properly.

I am creating tables will lots of number fields and its just very annoying
having to change 50 to 100 fields default value from 0 to null. Was just
wondering if like with a number fields default format, you could change what
it defaults to each time you create a new field.
 
F

Fred Boer

Dear rico:

Ah, well, yes, that is a different question. :)

As far as I know, there is no way to make Access use a Null for number
fields as the default. You could use code to programatically loop through
all of your tables and set this value once you have finished creating all of
the tables.

HTH
Fred Boer
 
Top