[AccessD] Question about the TableDef.Fields collection

John Colby jwcolby at gmail.com
Fri Aug 26 11:55:39 CDT 2022


A unique index prevents duplicates.

On Fri, Aug 26, 2022 at 9:46 AM Arthur Fuller <fuller.artful at gmail.com>
wrote:

> Like most Access programmers, I use AutoNumber fields as Primary Keys
> whenever it makes sense. However, it doesn't always make sense, and this is
> particularly so when the table of interest contains a relatively small
> number of rows. The reason I say this is because using an AutoNumber as the
> PK demands additional logic, to prevent otherwise equal rows from being
> added. For example, in a table of Countries, using an AutoNumber as the PK
> does not prevent the addition of country names that would duplicate an
> existing row. You could add Israel a dozen times, with each row having an
> AutoNumber. That said, I can think of no reason to have an AutoNumber in a
> table unless it is the PK.
>
> But in tables containing no AutoNumber field, is there a Field attribute
> that identifies the PK of the table of interest?
>
> Thanks in advance.
>
> --
> Arthur
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


-- 
John W. Colby
Colby Consulting


More information about the AccessD mailing list