Field type txt or nos for relating to autonumber field ?

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

Hi,
Should I make the field called ID in my second table a number or text type
of field when that field relates to my first table's primary key field
called ID which is an Autonumber field or does it not matter ?

This second tables PrimaryKey field will be called PhotoID by the way.

Steve
 
Steve

An Access Autonumber is a long integer. You'll need to have a "compatible"
data type in your second table (i.e., a Long Integer).

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Hi Jeff,
I have field type for the field that relates to the primary key of the first
table, as Number and its LongInteger so guess thats ok.
Steve
 
If you tried to use "Text" and then told Access to relate the two on those
fields, Access would "choke" and tell you something about a "data type
mismatch".

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Hi Jeff,
Good to know, my gut instinct is choose type Number for a field to relate to
a PrimaryKey field, as opposed to Text, confirmed by your answers so I
should be ok.

Steve
 
Back
Top