customer lookup

J

Jae Hood

I want to make a form that looks up orders based on a customer you
select from a combo box.
However, I can't use Lookup Value's for this because it would be too much to
maintain it as new customers are created each day.
I created a query that looks like this:
SELECT DISTINCT Orders.OrderID, Orders.CustomerID, Customers.CompanyName
FROM (Customers INNER JOIN Orders ON Customers.CustomerID =
Orders.CustomerID) INNER JOIN [Order Details] ON Orders.OrderID = [Order
Details].OrderID
WHERE (((Customers.CompanyName)=[Forms]![Order Lookup]![CustSelect]));

My combo box pulls up values from the CompanyName field in my customers table.
I added the Me.Requery code to my after update event for that combo box, but
the orders don't come up when i select a customer.

Any suggestions would be greatly appreciated.
Thanks!
 

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