How to pull default value form another table in access

Posted on 2008-11-18
Last Modified: 2013-11-29
Is it possible to pull the default value of a field form another table?  If so how?  I am running access 2007.
Question by:itsolutionsus
    1 Comment
    LVL 84

    Accepted Solution

    You can, but it's not the simplest thing to do. You'd have to do something like this:

    Dim dbs As DAO.Database
    Dim tdf As DAO.Tabledef
    Dim fld As DAO.Field
    Dim vDefaultValue As Variant

    Set dbs = CurrentDB
    Set tdf = dbs.TableDefs("YourTable")
    Set fld = tdf.Fields("YourField")

    vDefaultValue = fld.DefaultValue


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    The first two articles in this short series — Using a Criteria Form to Filter Records ( and Building a Custom Filter ( — discuss in some detail how a form can be…
    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now