Creating an Autolookup Query

  • Thread starter Thread starter JCook
  • Start date Start date
J

JCook

I want access to automatically fill in several fields based on a unique
customer number that the user will enter. I have a table set up with all of
the information I need to retrieve but I don't know which type of box on my
form I need to use to have access automatically fill in the relevant fields.
If I use a combo box, I have to click on each field for the data to be
retrieved. If I use a text box, my SQL statement doesn't work in the
expression window. Here is an example of my SQL statement:

SELECT Customers.BillingAddress
FROM Customers
WHERE ((([CustomerID])=([Customers].[CustomersID])));

Any help would be appreciated.
 
When you say "fill in several fields", it could mean you want to copy data
from one table into another table. Is this what you are trying to do?
(hint: not a good idea!)

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
What I'm trying to do is display a customer name, address and phone number on
an invoice. If there is a way to do that without copying the information
from the table, then that would work. Otherwise, I guess that is what I'm
trying to do. Thanks.

Jeff Boyce said:
When you say "fill in several fields", it could mean you want to copy data
from one table into another table. Is this what you are trying to do?
(hint: not a good idea!)

Regards

Jeff Boyce
Microsoft Office/Access MVP

JCook said:
I want access to automatically fill in several fields based on a unique
customer number that the user will enter. I have a table set up with all
of
the information I need to retrieve but I don't know which type of box on
my
form I need to use to have access automatically fill in the relevant
fields.
If I use a combo box, I have to click on each field for the data to be
retrieved. If I use a text box, my SQL statement doesn't work in the
expression window. Here is an example of my SQL statement:

SELECT Customers.BillingAddress
FROM Customers
WHERE ((([CustomerID])=([Customers].[CustomersID])));

Any help would be appreciated.
 
Access is a relational database. If you already have the data recorded
once, don't bother storing it again in another table (it just causes you
headaches, like trying to figure out which table has the CORRECT data?!).

Use a query to join your two tables of data, then build your report based on
that query.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP

JCook said:
What I'm trying to do is display a customer name, address and phone number
on
an invoice. If there is a way to do that without copying the information
from the table, then that would work. Otherwise, I guess that is what I'm
trying to do. Thanks.

Jeff Boyce said:
When you say "fill in several fields", it could mean you want to copy
data
from one table into another table. Is this what you are trying to do?
(hint: not a good idea!)

Regards

Jeff Boyce
Microsoft Office/Access MVP

JCook said:
I want access to automatically fill in several fields based on a unique
customer number that the user will enter. I have a table set up with
all
of
the information I need to retrieve but I don't know which type of box
on
my
form I need to use to have access automatically fill in the relevant
fields.
If I use a combo box, I have to click on each field for the data to be
retrieved. If I use a text box, my SQL statement doesn't work in the
expression window. Here is an example of my SQL statement:

SELECT Customers.BillingAddress
FROM Customers
WHERE ((([CustomerID])=([Customers].[CustomersID])));

Any help would be appreciated.
 
Back
Top