Access 2013 new number field default format

gdesreu

Active Member
Joined
Jul 30, 2012
Messages
318
in Access 2010 the default for a new number field is nothing, in Access 2013 the default for a new number field is now apparently set to 0.
0 is incorrect because it can be assumed a value was processed and the answer was 0 as opposed to not processed at all. This would be a step backwards if we have to worry about checking default number fields on every new table being changed. I have no idea why they reverted back to this but....does anyone know how to get this to automatically default to null as in 2010?
Otherwise 2013 will be uninstalled. (I was already half way there when I found out they removed windows search of outlook 2013 files)
Thanks
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
The default size for number fields is Long Integer. This is one of the largest field sizes. In Access, things will run more quickly if they are smaller (in general).
You can set any version DB property to zero, Use VBA like this:
Set db = CurrentDb
db.TableDefs("YourTable").<wbr>Fields("Yo<wbr>urColumn")<wbr>.Propertie<wbr>s("Default<wbr>Value") = "0"

Note that if a (any) DefaultValue has NOT been previously set for the column, you'll get an error (The property does not exist until you create it).
You should also insure that you have exclusive use of the database (no other users).
 
Upvote 0
The default size for number fields is Long Integer. This is one of the largest field sizes. In Access, things will run more quickly if they are smaller (in general).
You can set any version DB property to zero, Use VBA like this:
Set db = CurrentDb
db.TableDefs("YourTable").<wbr>Fields("Yo<wbr>urColumn")<wbr>.Propertie<wbr>s("Default<wbr>Value") = "0"

Note that if a (any) DefaultValue has NOT been previously set for the column, you'll get an error (The property does not exist until you create it).
You should also insure that you have exclusive use of the database (no other users).
Thanks but the issue is that we do not want the default to be 0. In access 2010 the default is not 0, in 2013 it is. We do not want to run the risk of new tables being created with a default value of 0 as 0 is a valid number meaning you ran a test and got a value of 0 which is incorrect. If it enters a 0 when no test has run then we have just entered erroneous data. Running VBA on every database is a step backwards as it means you have to ensure the users remember to run it. I was hoping there was a setting in 2013 to set this globally.
 
Upvote 0

Forum statistics

Threads
1,223,261
Messages
6,171,076
Members
452,377
Latest member
bradfordsam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top