I've been doing a new database from a huge and messy 1-2-3 with multiple
entries with some smalla differencies. While cleaning the table, I might
have left some of the Computers with a user ID that doesn't exist in User
table anymore, because I 'cleant' it. I mean there where same
User name with many ID-numbers, and I changed in the computer table them to
be the same and deleted the 'overcomes' from the User table. Just need to
check that there aren't any computers without an existing user.
OK .... in ACCESS, there is a query wizard that will create a query for you
to find "unmatched" records. That is the easiest way to do what you seek.
Try it, and post back with additional questions.
Hi there! Thank You for your answer... I know Access can do almost anything
one can desire, but I have a problem not knowing it's potentials and
functions.
I know the query wizard, and done queries with it, but to accomplish this
problem I am lost.
What is confusing you in the wizard? It should lead you through each step
fairly easily. You tell it that you want the Computers table to be the
results for the query, then you tell it you want the Users table as the one
that contains the related records, then you select the fields in both tables
that would be related/linked (UserID?), then you specify the fields from
Computers table that you want the query to show you, and then you are done.
Otherwise, assuming that the names I've listed above are correct, this is
the SQL statement of the query to show all Computer records containing a
UserID that does not exist in the Users table:
SELECT Computers.*
FROM Computers
LEFT JOIN Users
ON Computers.UserID = Users.UserID
WHERE Users.UserID Is Null;
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.