ISAUTOINCREMENT property of a field

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.
paulmcneilAsked:
Who is Participating?
 
Leigh PurvisConnect With a Mentor Database DeveloperCommented:
You could try a one liner

If (Currentdb.TableDefs("TableName").Fields("FieldName").Attributes and dbAutoIncrField) > 0 Then
    'Yep - it is one
Else
    'Nope
End If
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.