How do I set up an autolookup query and not get an error for amb.

G

Guest

I am having the hardest time with this. I have looked at northwind and
searched the help file to figure out what i am doing wrong. I have
downloaded samples of queries, forms, ect....I just cant seem to get it. I
am trying to make a purchase order form that will fill in the suppliers
name, address, ect. with the info. by putting in the supplier id number. I
have attempted several queries that would either not let me enter any info.,
when i used them on the form. I have also done queries that give me the
error of ambiguous join. i have tried editing the relationships all ways
that i know how and still cant seem to get it right. Please I am about to
scream at my poor computer.
 
6

'69 Camaro

Hi, Arleta.

You'll find a step-by-step example of using an autolookup query (including
the logic used in designing the tables to use this autolookup query easily)
to automatically fill in the information on a form on this Web page:

http://www.Access.QBuilt.com/html/forms.html#AutoCompleteForm

Most of the query examples you'll find will use a simple query with an inner
join on two tables. If you're having problems with an "ambiguous" error, it
means that Jet can't determine exactly which table has the field in
question, because more than one table has a field with this identical name.
You will need to either explicitly identify the table name or the table's
alias when identifying the field in the query. For example:

SELECT tblOrders.OrderID, tblOrders.SupplierID, tblSuppliers.Name,
tblSuppliers.Phone
FROM tblOrders INNER JOIN tblSuppliers ON tblOrders.SupplierID =
tblSuppliers.SupplierID;

SupplierID is a field in both tables, so explicitly identifying the table
name when using either of these field's names will prevent ambiguity.

If after you've read the example and tried to use it on your database, and
you are still having problems, please post your query's SQL statement so
that someone here can help you figure out what's wrong.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Any human can read my reply E-mail address and should alter it so that a
message will be forwarded to me. Spammers who use my UNALTERED reply E-mail
address will only satisfy the SpamEater's hunger.)
 
T

Tom Wickerath

Hello Arleta,

Another possibility for the ambiguous join (ambiguous outer join) error message is discussed in
the following KB article:

Explanation of "Ambiguous Outer Joins" Error Message
http://support.microsoft.com/?id=208878

You can get this with two outer joins that point toward each other, even though identical field
names are fully qualified. For example, the following SQL statement run in the sample Northwind
database will produce an ambiguous outer join error message:

SELECT Shippers.CompanyName, Orders.OrderDate, Customers.ContactName
FROM Shippers LEFT JOIN (Customers LEFT JOIN Orders ON Customers.CustomerID = Orders.CustomerID)
ON Shippers.ShipperID = Orders.ShipVia;


Tom
___________________________________________


Hi, Arleta.

You'll find a step-by-step example of using an autolookup query (including the logic used in
designing the tables to use this autolookup query easily) to automatically fill in the
information on a form on this Web page:

http://www.Access.QBuilt.com/html/forms.html#AutoCompleteForm

Most of the query examples you'll find will use a simple query with an inner join on two tables.
If you're having problems with an "ambiguous" error, it means that Jet can't determine exactly
which table has the field in question, because more than one table has a field with this
identical name. You will need to either explicitly identify the table name or the table's alias
when identifying the field in the query. For example:

SELECT tblOrders.OrderID, tblOrders.SupplierID, tblSuppliers.Name, tblSuppliers.Phone
FROM tblOrders INNER JOIN tblSuppliers ON tblOrders.SupplierID = tblSuppliers.SupplierID;

SupplierID is a field in both tables, so explicitly identifying the table name when using either
of these field's names will prevent ambiguity.

If after you've read the example and tried to use it on your database, and you are still having
problems, please post your query's SQL statement so that someone here can help you figure out
what's wrong.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Any human can read my reply E-mail address and should alter it so that a message will be
forwarded to me. Spammers who use my UNALTERED reply E-mail address will only satisfy the
SpamEater's hunger.)
___________________________________________


I am having the hardest time with this. I have looked at northwind and searched the help file to
figure out what i am doing wrong. I have downloaded samples of queries, forms, ect....I just
cant seem to get it. I am trying to make a purchase order form that will fill in the suppliers
name, address, ect. with the info. by putting in the supplier id number. I have attempted several
queries that would either not let me enter any info., when i used them on the form. I have also
done queries that give me the error of ambiguous join. i have tried editing the relationships
all ways that i know how and still can't seem to get it right. Please I am about to scream at my
poor computer.
 

Ask a Question

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.

Ask a Question

Top