password forms

VTG

New member
Local time
Today, 00:05
Joined
Apr 4, 2008
Messages
6
hi, i am currently working on a computing project using access 2003, and i am not very familiar with VBA.
At the moment, i have designed a simple logging-in form (with a function that checks the password typed in for a username (selected from a combo box) against the password value stored in a table
Is there a function in visual basic access where each time a user logs in, the date (and date) is recorded into the table where the user details and passwords are stored?

help would be much appreciated
 
You could easily store a "Last Login" date/time in a field in that table - it would only have the last login, not every time they logged in. For the latter, a new table will be necessary.

When you login, in the code just put a SQL statement that does this. Have it update the Last Login field to Now() when the user successfully logs in - just use a where clause to isolate the username. I don't know how you have it all setup but that should work.
 
i've just done it using the following code:
DoCmd.RunSQL "UPDATE tblEmployeePassword SET[LastLoggedOn]=Now() WHERE [EmployeeID]=CmbxUsername"
(where 'CmbxUsername' is a combo box to allow the user to select the username from a list)
how would i get rid of the message that access pops up to confirm the updating process?
 

Users who are viewing this thread

Back
Top Bottom