Access 2013 turn off default value for Number fields

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    Access 2013 turn off default value for Number fields

    I just discovered that Access 2013 puts in a default value of 0 for number fields. This is very annoying when relating fields and you get an error when trying to insert records thinking that I'm leaving the FK field blank and it has a default value that doesn't have a related record in the other table. Is there a way to turn off this "helpful" feature that Microsoft has added? I just had to go through 40 table looking for all the number fields so that I could remove the default value.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32661

    #2
    No idea whether or not it's configurable Seth, but you could knock up a relatively short piece of code to trawl through all your Forms and their TextBox controls and reset the DefaultValue property if it's set to 0.

    Comment

    • Seth Schrock
      Recognized Expert Specialist
      • Dec 2010
      • 2965

      #3
      I suppose that I could do that. I've just not done much with table design in VBA so I'll have to look that up. I just don't get why Microsoft would put that in!

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32661

        #4
        I can't help you with psycho-analysing MS, but I've done such code oodles of times so hit me up for some pointers any time.

        Comment

        Working...