J
Jamie Collins
I rarely use the MS Access UI but I just now created a table named
Table1 in MS Access and I got a message saying, "A table must have a
primary key for you to define a relationship between this table and
other tables in the database".
'Relationships' is MS Access-speak for DRI, foreign keys and all that,
right? However, despite what that message says, I can indeed use my
table in a 'relationship' because it has a column with a unique index.
I copied Table1, pasted and named the new table Table2, then
successfully created a 'relationship' between these two tables, using
that GUI drag-and-drop 'relationships' thing. Afterwards, I checked
the DB's constraints using ADO's OpenSchema method and found that MS
Access/Jet had created a foreign key named Table2Table1 for me.
So this is a 'heads up' to not believe this message (unless I'm
missing the point, of course). It's issues such as this that make me
less than enamoured with the MS Access UI <g>.
Jamie.
--
Table1 in MS Access and I got a message saying, "A table must have a
primary key for you to define a relationship between this table and
other tables in the database".
'Relationships' is MS Access-speak for DRI, foreign keys and all that,
right? However, despite what that message says, I can indeed use my
table in a 'relationship' because it has a column with a unique index.
I copied Table1, pasted and named the new table Table2, then
successfully created a 'relationship' between these two tables, using
that GUI drag-and-drop 'relationships' thing. Afterwards, I checked
the DB's constraints using ADO's OpenSchema method and found that MS
Access/Jet had created a foreign key named Table2Table1 for me.
So this is a 'heads up' to not believe this message (unless I'm
missing the point, of course). It's issues such as this that make me
less than enamoured with the MS Access UI <g>.
Jamie.
--