OK I want to make a form with a list box. The list box values are customer codes for each sales rep. I can make the listr box but how do I get the values? Each customer is associated with a salesrep and each salesrep has a sales assistant. A sales assistant can be associated with several sales reps. When a Sales rep logs in I want to use their id to get the salesrep number and show only their customers. When a sales assistant logs in I want to use their id to get all the customers associated with all their salesreps.
There is a customer table that lists CustomerID and SalesRepID.
There is another table that lists SQL login name, salesrepid and each sales assistant associated in a table with these fields:
SQLuserid,salesrep_id,Customer1,Customer2,Customer3,Customer4,Customer5,Customer6,Customer7,Customer8
john,1001
mary,1009,1009,1001,1002,1004,1006
sally,null,10221023
frank,1010
joe,null,1003
suzie,8192,8192,8676
where john and frank can see all customers.
mary and suzie are salesreps and assistants and see their customers as well as customers in fields customer1-8
sally and joe are assistants that can see only those customers for the salesreps in customer1-8
I am using Access2010 frontend with SQL2005 backend.
Does anyone know how I can populate the list box with customer ids for only those customers they're allowed to see?
Thanks
There is a customer table that lists CustomerID and SalesRepID.
There is another table that lists SQL login name, salesrepid and each sales assistant associated in a table with these fields:
SQLuserid,salesrep_id,Customer1,Customer2,Customer3,Customer4,Customer5,Customer6,Customer7,Customer8
john,1001
mary,1009,1009,1001,1002,1004,1006
sally,null,10221023
frank,1010
joe,null,1003
suzie,8192,8192,8676
where john and frank can see all customers.
mary and suzie are salesreps and assistants and see their customers as well as customers in fields customer1-8
sally and joe are assistants that can see only those customers for the salesreps in customer1-8
I am using Access2010 frontend with SQL2005 backend.
Does anyone know how I can populate the list box with customer ids for only those customers they're allowed to see?
Thanks