Form with complicated List Box

turkee

Registered User.
Local time
Yesterday, 23:21
Joined
Feb 20, 2011
Messages
13
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
 
OK I worked this out so I can get a multi selection list box. Now how can I use the selections in a report?
 
Thank you Mr. Big Booty, but that's not exactly what my user wants. He wants to select multi customers and run a report to a pdf file for each and every customer, so if he selects 5 customers in the listbox, 5 pdf' files will magically appear in his directory. The report and the query that runs it ( a big complicated parameter query that now runs 1 customer at a time for a date range) both exist now.
Is that even possible or should I just tell him to be happy with what he's got?
Thanks
 
Sure it's not exactly what you want. It is now up to you to dissect the code, and use those principals to rebuild it to do what you want.

The best way to do that is to play with the code and make small adjustments to it, so you gain an understanding of what it is doing.
 

Users who are viewing this thread

Back
Top Bottom