Hi
thought yesterday I had sorted my first Access project, learned a lot and was pleased everything worked as I want.
Ran some test searches and the results were to say the least not what I expected in every case.
Spent the day looking and could find nothing obvious as the search worked sometimes.
So I went back to the start and looked at the two tables I was given from a really old Database pre XP.
TWo tables Graves and Memorials both contain a field called Mlink which was used in some compiled way as a link.
memorials has 17662 records
Memorial has 17662 Mlink fields
Graves has 39201 records
Graves had 18093 Mlink fields
I obtained these figures by using the code:
Code:
SELECT Memorials.MLink, Memorials.Plot, Memorials.GraveNo
FROM Memorials
WHERE (((Memorials.MLink) Is Not Null));
similarly for Graves.
So this means that there are 431 Mlink entries in the table Graves that I would like to delete as they have no reference to the table memorials
Using the query wizard I created the query
Code:
SELECT Graves.MLink, Graves.Plot, Graves.GraveNo,
FROM Graves LEFT JOIN Memorials ON Graves.[MLink] = Memorials.[MLink]
WHERE (((Memorials.MLink) Is Null));
Which shows only 278 mlinks in the table Graves that are not in the table memorials
So I have a discrepancy of 153
Is my logic at fault? Don't really want to start thinking about deleting until I understand why I have these two different figures.
Thanks
Ian