Hi i am trying to create public functions for my login database.
I want following functions to call at when anyone login to database
1. Computer name i have tblLoginSessions where i have field name [ComputerName] i want when user login then it should capture that user's computer name and store it in tblLoginSesssions.[ComputerName]
2. ComputerIP this is IP address this is one more layer of reconciliation because most of the time we work on network and not individual PC also user can be a IT guy so he can manipulate the things after login.
for this i have field in tblLoginSessions called [ComputerIP] the same way of doing computer name it should also capture single row and full IP address and store it in table.
3. I have field call Active which is check box field that indicate user have logged in and active this will facilitate to find out how many users are online and this also same we need to call function on login form to mark it as active also when he close database or close the form it should have sort of arrangement to uncheck that box as he is no more active.
4. I have [EmpID] field in tblLoginSessions that also should be filled with Emp ID who is logging in the database.
I check examples online but most of it are mixed with username and login name etc no function is separately coded.
Please i need this all three in separate functions and call procedures, if you have any idea of preparing this or have sample that will help me a lot.
I will be happy if its not required the public variables and can done by just coding the parameters in frmLogin btnOK.
I want following functions to call at when anyone login to database
1. Computer name i have tblLoginSessions where i have field name [ComputerName] i want when user login then it should capture that user's computer name and store it in tblLoginSesssions.[ComputerName]
2. ComputerIP this is IP address this is one more layer of reconciliation because most of the time we work on network and not individual PC also user can be a IT guy so he can manipulate the things after login.
for this i have field in tblLoginSessions called [ComputerIP] the same way of doing computer name it should also capture single row and full IP address and store it in table.
3. I have field call Active which is check box field that indicate user have logged in and active this will facilitate to find out how many users are online and this also same we need to call function on login form to mark it as active also when he close database or close the form it should have sort of arrangement to uncheck that box as he is no more active.
4. I have [EmpID] field in tblLoginSessions that also should be filled with Emp ID who is logging in the database.
I check examples online but most of it are mixed with username and login name etc no function is separately coded.
Please i need this all three in separate functions and call procedures, if you have any idea of preparing this or have sample that will help me a lot.
I will be happy if its not required the public variables and can done by just coding the parameters in frmLogin btnOK.