How to Get the Windows Username in MS Access
HTML-код
- Опубликовано: 6 мар 2023
- In this episode, we're going to learn how to get the Windows username for our Microsoft Access application, so that users can be greeted and also to allow us to log certain user actions in our database for administrative purposes. This is a very handy skill for any MS Access developers to learn as it can improve your user's experience and help your logging processes. We'll take a look at two different ways to get the Windows username with the attached domain, so that you can choose which is better for your application.
Related Videos:
How to disable and enable the Bypass Key on your MS Access app so users cannot bypass Autoexec/Forms
• How to disable and ena...
Link and Relink Your Access Front-End App Using vbScript and a Table-Based Approach
• Link and Relink Your A...
How to Use vbScript to Relink Your User's MS Access Application Front-End Automatically
• How to Use vbScript to...
Use vbScript to Deploy your Access Front End, Create Shortcuts, and Check for Updates on User Login
• Use vbScript to Deploy...
How to Encrypt and Hash Passwords in MS Access
• How to Encrypt and Has...
How to Encrypt Sensitive Data in Microsoft Access
• How to Encrypt Sensiti...
How to Kick Users out of Your MS Access Database
• How to Kick Users out ...
How to Get the IP Address in Microsoft Access
• How to Get the IP Addr...
How to Get the Windows Username in MS Access
You are watching this video now!
How to Set Basic Startup Options on Your Microsoft Access Database
• How to Set Basic Start...
Join me on Patreon!
/ mackenziedataengineering
Demo of my BZ RDP Cloaker:
www.patreon.com/posts/how-to-...
Check out some tech (and support my channel!):
www.amazon.ca/shop/seanmacken...
Want the code from this video?
mackenziemackenzie.com/downloads
For developers looking for a new role, check out and sign up:
www.toptal.com/qKaO2b/worlds-...
Needing to hire technical resources for your project? Get the best:
www.toptal.com/qKaO2b/worlds-...
Contact form you can find at www.mackenziemackenzie.com/
Follow me on social media:
/ mackenziedataanalytics
/ seamacke
/ seamacke
/ seamacke
/ psmackenzie
Get Microsoft Office including Access:
click.linksynergy.com/fs-bin/...
Got a RUclips Channel? I use TubeBuddy, it is awesome. Give it a try:
www.tubebuddy.com/seanmackenz...
#msaccess #vba
You’re a life saver
Thank you
Glad it worked!
Thanks so much, great video.
My pleasure!
Great excactly I was waiting for
Glad to hear that! cheers
Thanks, this was good!
Glad you liked it!
This is fantastically useful stuff (like all of your videos). I'd like to request a video on how to obtain a user's email address from the GAL in Outlook if you would. Keep on doing what you do, it's EXTREMELY helpful to a rookie Access developer like me. 😎
Great suggestion! And I'll add that one to my list! cheers
Thank you!!! I was wanting to learn this.
Glad I could help! cheers
1-Handy hint. I have being using second option = environ variable with computer name
2-Any trick to get the Full name than the login name!!!! Or user email address
3-User logger also very handy I get login time and log off time
4- Could not find it in the Download page appreciate if you add it so that I could get it into my collection
As always appreciate your knowledge base contribution
Cheers 🏃🏽
Thanks for the feedback! The downloads page has been updated. Getting more information about the user is possible through a LDAP query if you're in a domain, but that is another function that we will have to explore in another video. I'll add it to my list. cheers
wow. cool solution.
Sir please make a video on COM control in access. how get data into a table from COM PORT.
That's a great idea - I'll put that on my list! thanks!
thanks for the video , it was really great , can you please show how to get the ip address for the device of the user ?
You can use a function like this to get the IP:
Function IpAddress()
Dim objNics, objNic, strIP, strComputer, strIps
Set objNics = GetObject("winmgmts:").InstancesOf("Win32_NetworkAdapterConfiguration")
For Each objNic in objNics
if objNic.IPEnabled then
strIP = objNic.IPAddress(0)
If Len(strIps) > 0 Then strIps = strIps & ","
strIps = strIps & strIP
End if
Next
IpAddress = strIps
End Function
To use it, load your variable:
strIp = IpAddress()
MsgBox strIP
or do what you want with it!
Can you get Windows Password like Username ?!!🙂
No, I'm afraid not!
I can imagine that this "function" could be used when closing the mask! @seanmackenziedataengineering
Thanks for sharing!
@@seanmackenziedataengineering I took this tutorial and the one "How to Kick Users out of Your MS Access Database" because I would like to create a log file of accesses and exits from the database. Obviously I divided the DB into FE and BE. Am I on the right track? ps: i follow you from Italy!
@@alessiosonis981 You bet! You can use this one ruclips.net/video/Rqhlr6NwUu8/видео.html to log the time a form is closed.