Can anyone explain what is happening here?
2 tables tblA and tblB, each with a code column and a full-text column (e.g.
C001, "Joe Bloggs"). tblA contains a small subset of the rows in tblB. There
is a query joining these as follows:
SELECT tblA.Code, tblA.Adata, tblB.Bdata
FROM tblA INNER JOIN tblB ON tblA.Code = tblB.code;
tblB.Code is the primary key in that table.
If tblA.Code is defined as tblA's primary key:
On creating a new record in the query datasheet, all 3 columns must be
entered;
and on deleting a record in the query datasheet, the corresponding tblA and
tblB records both vanish.
Now if tblA has no primary key, what do we find? (Exactly the same query
remember):
On creating a new record in the query datasheet, as soon as tblA.Code is
entered, tblB.Bdata is filled in by Access;
and on deleting a record in the query datasheet, the corresponding tblA
record vanishes, but the tblB record remains.
--
************************************************** **********************
Dave Stone e-mail: D.*****@ed.ac.uk
Computing Services Telephone: +44 131-650-3314
University of Edinburgh Internal ext: 503314
Main Library, George Square FAX: 0131-650-3308
Edinburgh EH8 9LJ
************************************************** **********************