Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Default Value Settings
Callum Stuart 
    
4 years ago
Hi guys. Is there a system-wide or even database-wide setting for changing the default value in Table Design, specifically for fields assigned number data types in Table Design view, in the General tab?
Currently my system (Access 2016, Win10) defaults the default value of a Number field to 0, I would like to change that to NULL, as universally as possible, if at all. Thanks!
Kevin Yip  @Reply  
     
4 years ago
This needs to be done with VBA.  The code looks something like below.  You need to use something called ADO (ActiveX Data Objects), which you need to enable in the VBA editor's references (see picture below).  Then you run a simple SQL statement as shown to change the default of a field.  This is the only way I know how to do this other than having to manually do it in table design.  If you have lots of tables that need this, then this is a good way to automate the process.  You can even automate the creation of tables with a "CREATE TABLE" SQL statement.  Of course, changing table structure when the table already contains data could lead to data loss.

A system-wide setting would not be practical because a table has tons of settings.  It would be impractical to have a mile-long option screen to set defaults for every single table settings.
Kevin Yip  @Reply  
     
4 years ago

Kevin Yip  @Reply  
     
4 years ago
Also, the syntax of that SQL statement is not straightforward.  A long integer field in table design is referred to as INTEGER in the SQL.  An integer is called SMALLINT.  A single is called REAL.  A double is called FLOAT.  If you use SQL Server, they should look familiar.
Scott Axton  @Reply  
        
4 years ago
So basically, the answer is no.  That is a part of Access and there isn't a setting to allow you to change the behavior for new fields or databases.
Callum Stuart OP  @Reply  
    
4 years ago
Thanks for the info. Given the fact that I was merely trying to avoid pressing F6, DOWN, DOWN, DOWN, DEL, as I was forgetting maybe 1 in 3 times when making FK fields, I'll hard agree with Scott and come back to Kev's method when I don't get confused by the most basic of SQL SELECT statements, they're still basically dark magic to me.
Scott Axton  @Reply  
        
4 years ago
Callum if you want a little intro to SQL check out the SQL with Access.
Don't worry about it tons right now though.  You are on the right path following the courses.  
As your knowledge level increases, the Access SQL Seminars will be of benefit to you down the road.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/9/2026 2:37:48 PM. PLT: 0s