Display Listbox Records based on login

papic1972

Registered User.
Local time
Tomorrow, 10:14
Joined
Apr 14, 2004
Messages
122
Hi All,

Does anyone know if this can be done?

I have a listbox that displays monthly sales records for each of our sales reps, for example something like this:

SalesRep Month to Date
DW $100000
SW $85000
TY $87500
MH $94000

Is there anyway to show only the "DW" line of the listbox if user "DW" is logged in? I hope this doesn't sound too confusing!
 
Last edited:
There are a couple of different ways to accomplish what you want.
When "DW" is logged in, somewhere in the database there will be a table, a property or a hidden form with the ID for the user logged in.
Does your database have a table for users and their login?

Depending on your database, you could use the login info to change the row source of the listbox each time the form opens. Write code that sets the sql for the listbox.

Another possibility is to use the users login table together with the other table you already have in the query that is the row source for the listbox. Use criteria in the loginID field to limit the query to just the user who logs in.

I will look for a sample database that shows how to do this.
 
I couldn't find a sample db to do exactly what you want.
Here is a link to a log in form that will start you on the process. Post back as you need to.
 

Users who are viewing this thread

Back
Top Bottom