Combo box question

G

Guest

I am in the first stages of setting up our new database. I am good at
figuring out how to tweek the old one but starting from scratch is puzzling
me.

I have only gotten as far as setting up the records in a table. What I am
wanting to do is make a drop down list in the jobs menu that only pulls up
the salepersons for that particular company.

I have tried going into lookup, selecting combo box, and then making an SQL
statement.
SELECT SalesPersons.Salesperson, Customers.CustomerID FROM Customers INNER
JOIN SalesPersons ON Customers.CustomerID = SalesPersons.CustomerID;

but this brings up all the salesperson for all companies. Can you tell me
what I am doing wrong.
 
G

Guest

I am sorry I am an idiot when it comes to this. I don't understand what you
want me to do. I took it as copying and pasting that to the end of what I
already have....that did not work.

KARL DEWEY said:
Add --
WHERE SalesPersons.Salesperson = [Forms]![YourForm]![YourComboBox]

tcorlew said:
I am in the first stages of setting up our new database. I am good at
figuring out how to tweek the old one but starting from scratch is puzzling
me.

I have only gotten as far as setting up the records in a table. What I am
wanting to do is make a drop down list in the jobs menu that only pulls up
the salepersons for that particular company.

I have tried going into lookup, selecting combo box, and then making an SQL
statement.
SELECT SalesPersons.Salesperson, Customers.CustomerID FROM Customers INNER
JOIN SalesPersons ON Customers.CustomerID = SalesPersons.CustomerID;

but this brings up all the salesperson for all companies. Can you tell me
what I am doing wrong.
 
G

Guest

The syntax for SQL statement is to end with a semicolon. Remove the
semicolon that ended your SQL, paste, and add a semicolon to the end.

tcorlew said:
I am sorry I am an idiot when it comes to this. I don't understand what you
want me to do. I took it as copying and pasting that to the end of what I
already have....that did not work.

KARL DEWEY said:
Add --
WHERE SalesPersons.Salesperson = [Forms]![YourForm]![YourComboBox]

tcorlew said:
I am in the first stages of setting up our new database. I am good at
figuring out how to tweek the old one but starting from scratch is puzzling
me.

I have only gotten as far as setting up the records in a table. What I am
wanting to do is make a drop down list in the jobs menu that only pulls up
the salepersons for that particular company.

I have tried going into lookup, selecting combo box, and then making an SQL
statement.
SELECT SalesPersons.Salesperson, Customers.CustomerID FROM Customers INNER
JOIN SalesPersons ON Customers.CustomerID = SalesPersons.CustomerID;

but this brings up all the salesperson for all companies. Can you tell me
what I am doing wrong.
 

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