table is already opened exclusively by another user

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm the only user for this database.

I want to make following query linking the table Detail two times to another
table Person:

SELECT Detail.Detail, Person.FirstName, Person.LastName, Detail_1.Detail
FROM (Person LEFT JOIN Detail ON Person.TitleID = Detail.DetailID) LEFT JOIN
Detail AS Detail_1 ON Person.GenderID = Detail_1.DetailID;

I get following error:

The table "Detail" is already opened exclusively by another user, or it is
already open through the user interface and cannot be manipulated
programmaticaly

Following query doesn't provoke an error:

SELECT Detail.Detail, Person.FirstName, Person.LastName
FROM Person LEFT JOIN Detail ON Person.TitleID = Detail.DetailID;

Why do I get this error and how can I prevent that error?

Thanks
 
It seems very strange to me that both the Person.TitleID and Person.GenderID
would be linked to the same Detail.DetailID.

For something like this to work, I'd think that the inner join would need to
be on the Person table and not the Detail table.
 
Jerry,

thanks for you reply.
The fact is that the Detail table contains all kind of codifications of all
kind of subjects like titles, gender, .... These codes on them selves are
grouped and there is an other table CodeGroup that can be linked to Detail.
In the specific query I don't need those code groups, I only need the codes
from Detail.
So instead of 1 in table Person in field GenderID, I get "Male" in my query,
instead of 6 in table Person in field TitelID, I get "Dr." in my query.
I personaly would make a seperate table with titels, and another with
gender, etc... But this was not designed by me, I have to use the tables
structure as it is, and it worked before Office 2003 (in combination with
Access XP) was installed on my PC.
The only thing I'm looking for is to make it work again...
 
Back
Top