View Full Version : query - 3 tables all linked error???


capri
08-23-2001, 07:27 AM
I keep running into this error and am at a loss of how to get around it.

Any time I try to create a query that involves 3 tables that are all linked, I get an SQL error. The SQL statement could not be executed because it contains ambiguous outer joins. To force one of the joins to be perfromed first, create a separate query that performs the first join and then include that query in your SQL statement.

eg.

ActivityTable DateTable
UID-----------------------UID (one to one)

Activity Table UpdateTable
UID-----------------------UID (one to many)

DateTable UpdateTable
UID-----------------------UID (one to many)


Most of my tables are linked to the ActivityTable because that is where the description of the activity is. So most of my forms are based on queries that include the ActivityTable and one other (eg DateTable). If I try and add the UpdateTable to the query, so that the Field for entering the date that an item was updated becomes available, I get the above error.

Does this mean I have to create 2 queries in order to be able to create a form, drawn from the 3 tables. If so how would I link the 2 queries.

All that I want in this case is to produce a form that will pull the description from the ActivityTable, whatever other info eg due date from the DateTable, and allow me to put a datestamp to the UpdateTable so that whenever ANY item in any of my tables is changed, the datstamp will work.

I keep running into this problem whenever I want to use 3 linked tables and can't understand how to get around it. I can;t follow Access's logic in this.

If someone could suggest where I might look to find a proper explanation of what is happening, I would greatly appreciate it. Thanks.

Liv Manto
08-23-2001, 08:54 AM
Does this mean I have to create 2 queries in order to be able to create a form, drawn from the 3 tables. If so how would I link the 2 queries.

You link the two queries in a new query. Queries are treated like a table.

capri
08-23-2001, 09:23 AM
Thanks Liv,

still having problems though, the query seems to work , but can't get the update field to work. It won't even work on the ActivityForm any longer, I get

The changes you requested to the table were not successfule because they would create duplicate values in the index (which as far as I know I don't have), primary key or relationship. Change the data in the filed or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.

Perhaps I did the linking of the queries wrong, quess it's back to the drawing board.