Changing list content

janfolmer

Registered User.
Local time
Yesterday, 16:43
Joined
Nov 30, 2005
Messages
24
I have 3 tables in my database; 1) Policies, 2) Salespeople and 3) Shops.
We have a several shops, and each shop has their own salespeople. In the table Policies we have to select the shop where the policy is sold, but also the salesperson that made that sale. As soon as we receive a policy from Shop A we have to add that new record in the Table Policies. This table we select the shop, say for instance Shop A. The next column there is a droplist of all the salespeople.
Now my question: Is there a way to get a dropdown list of only the salespeople from Shop A, or only the salespeople from Shop B when I select Shop B?
 
Hey Jan,

You could add a field in Salespeople (if not already there) that would let you link the Shops table and Salespeople table, allowing you to identify which Shop a Salesperson works for and then when a salesperson is added, you could assign what shop they work in. Then you could filter your combo box (dropdown list) according to the shop the new record is being entered for, which in turn would show only the salespeople for that shop.

HTH,
Shane
 
Last edited:
You need a table for Sales.
 
one way is that you can have one table for each location listing the salespeople in those locations and set the row source based on your selection.

so, without actually puting in the code cause I'm not so good at coding & it would take me too long (sorry).

have one dropdown called Site, or something. Set the 'on update' property to:
If Site = "Store A" Then
Salesperson.RowSource = StoreA
EndIf Site = "Store B" Then
Salesperson.RowSource = StoreB
Else Salesperson.RowSource = StoreC

ok, so maybe alittle code.

the other way is to have it all in one table and use a query to sift through your data while having the rowsource always pointing to the query. I find the first way to be easier, so here you have it.

please someone confirm all of this, as I am pretty poor coder myself.

good luck!
 
Last edited:

Users who are viewing this thread

Back
Top Bottom