By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,050 Members | 1,703 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,050 IT Pros & Developers. It's quick & easy.


P: 24
I have developed an application in Access 2007 where users log in using their password. When a Project is received it is assigned to one of the user who also receives an email alert. The user then clicks the "MyProjects" combo box and selects his userid to view his new projects. But this combo displays all other users too and this would enable him to see what has been assigned to other users too.I require that the individual users only view the Projects that are assigned to them and not what the others have been assigned. This is a multi user database. Is there anyway I could connect the password to the "MyProjects" view?
Apr 27 '12 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 100+
P: 2,321
I presume you have a table somewhere with usernames and passwords? Then you hopefully also have some sort of unique primary key on the table. For now I will just assume you have called it PK_User, and that your projects table has a related foreign key, FK_User.

In your login procedure you should store the userID in the tempvars collection, after having verified their password.
Expand|Select|Wrap|Line Numbers
  1. Tempvars!UserID=PK_User
Then your combobox recordsource could look like:
Expand|Select|Wrap|Line Numbers
  1. SELECT * FROM tbl_Projects WHERE FK_User=TempVars!UserID
Apr 27 '12 #2

P: 24
I managed to ensure that the users see only the Projects assigned to them. However to expand on the problem, I have a situation where various users will be required to input some data for their respective projects. How to ensure that the user only works on the Projects that were assigned to him. If I include a combo where he will be asked to select his id, this would become very cumbersome for the users or even if I force a log in everytime before data entry. Is there a better way to handle this. I am not clear how to manage this in a multi user environment.
Apr 30 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.