ISAUTOINCREMENT property of a field

Posted on 2006-05-02
Last Modified: 2010-05-18
I've found two EE cases where people asked how to determine if a table field is an Autonumber field. Both answers show how to check the ISAUTOINCREMENT propety of a field. When I try that with Access 2003 I get an error that the property is not found.
Question by:paulmcneil
    1 Comment
    LVL 44

    Accepted Solution

    You could try a one liner

    If (Currentdb.TableDefs("TableName").Fields("FieldName").Attributes and dbAutoIncrField) > 0 Then
        'Yep - it is one
    End If

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
    Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
    Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

    732 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

    17 Experts available now in Live!

    Get 1:1 Help Now