Form reminders for specific user only

Koloss

New member
Local time
Today, 04:37
Joined
Feb 7, 2013
Messages
5
Hello.
In my database, I have a form of reminder.
Query collect all the information about the unfinished business at the base and at the start-up of the base shows form reminders.
The base is splitet into front and back end, and are located on the server. Each user is assigned rights what can be done in the database.
The problem where I am "stuck" is to make the form reminder that can be seen only by those users whose jobs are not completed and not all users of the database. Each user uses his computer with your username and password. I tried to connect to form reminder with this information, but I failed.
I searched all the forums but have not found such an example.
Does anyone know how to overcome this problem ?
 
There is a way to get the windows username of the current user:

Code:
Environ("Username")
So you could include a check to only show the items where Environ("Username") = PersonToDoBusiness, or something like this.
 
If your reminders table contains a windows userid for who should be reminded then it should not be a problem

You need a function to determine who is currently logged in on a particular machine - the one you use to check against your user table to determine their access rights should do - lets say it is called 'function CurrentUser' which returns the userid

then your query would be something like

Code:
SELECT * FROM tblReminders WHERE userID=CurrentUser AND Completed=False
 
If your reminders table contains a windows userid for who should be reminded then it should not be a problem

You need a function to determine who is currently logged in on a particular machine - the one you use to check against your user table to determine their access rights should do - lets say it is called 'function CurrentUser' which returns the userid

then your query would be something like

Code:
SELECT * FROM tblReminders WHERE userID=CurrentUser AND Completed=False

If my memory serves me correctly then I think the name 'CurrentUser' is already a function: it returns the name of the user in the current workgroup if you have one setup, otherwise just returns 'Admin' or something similar. So best use a slightly different name just to be safe!
 
I think the name 'CurrentUser' is already a function
You're right! You would need to use a different function name
 
I think that's it. I think that's it. Thank you both very much for help.
 

Users who are viewing this thread

Back
Top Bottom