Hello All,
if I have a login form, to login to a database which multiple users are using it...
how to log the user name for the new records inserted or modified by this user with the time stamp using VBA codes
Regards
Siyamand
How to To log data entry form user name in MS Access database using VBA
-
- BronzeLounger
- Posts: 1252
- Joined: 01 May 2016, 09:58
-
- Administrator
- Posts: 78586
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: How to To log data entry form user name in MS Access database using VBA
Do you keep the login form open? If not, do you store the login name somewhere?
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1252
- Joined: 01 May 2016, 09:58
Re: How to To log data entry form user name in MS Access database using VBA
We have a table for the username and password which use for login to the database
The form will be closed after success login
The form will be closed after success login
-
- Administrator
- Posts: 78586
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: How to To log data entry form user name in MS Access database using VBA
How do we know the username when the login form has been closed?
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1252
- Joined: 01 May 2016, 09:58
Re: How to To log data entry form user name in MS Access database using VBA
Im not sure but usually when you login to a system the login screen disappear, it will be closed or minimized?
-
- Administrator
- Posts: 78586
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: How to To log data entry form user name in MS Access database using VBA
If you want to log the username, we have to know the username...
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1252
- Joined: 01 May 2016, 09:58
-
- Administrator
- Posts: 78586
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: How to To log data entry form user name in MS Access database using VBA
You have to store the username somewhere, for example a text box on a form that remains open, or in a table...
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1252
- Joined: 01 May 2016, 09:58
Re: How to To log data entry form user name in MS Access database using VBA
Aha so we can put a label that shows the logged in user name
-
- Administrator
- Posts: 78586
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: How to To log data entry form user name in MS Access database using VBA
That's one possibility.
Do you want to log the username and timestamp in each table itself, or do you want to use a separate table that contains these data for all tables that you want to log?
Do you want to log the username and timestamp in each table itself, or do you want to use a separate table that contains these data for all tables that you want to log?
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1252
- Joined: 01 May 2016, 09:58
Re: How to To log data entry form user name in MS Access database using VBA
I believe the second option os more practical having one table for users log
Regards
Regards
-
- Administrator
- Posts: 78586
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: How to To log data entry form user name in MS Access database using VBA
See for exampleAudit Trail using Data Macros
Best wishes,
Hans
Hans