Access - How to log the Windows Username

Поділитися
Вставка
  • Опубліковано 1 гру 2024

КОМЕНТАРІ • 50

  • @cadamlong
    @cadamlong 2 роки тому +2

    Very insightful, well stated, and easy to follow. You are a gifted teacher! Thank you! I was praying to find an answer on how to accomplish this task and after many hours of reviewing other solutions, I came across your video. You/your video was the perfect answer that I needed. Thank you!

  • @Bradley_Clark
    @Bradley_Clark 3 роки тому +2

    You have no idea how happy this made me:) thanks kab

  • @naikakshay16
    @naikakshay16 6 років тому +1

    This video deserves over a million views.. great job! It was so easy to understand compared to the hundreds of other videos Ive seen recently. Thank you.

  • @venkatyalamati3285
    @venkatyalamati3285 2 роки тому +1

    Superb video sir.. Excellent! Thank you so much!

  • @delmercartagena4833
    @delmercartagena4833 4 роки тому +1

    This video is the answer to my prayers! Thanks a lot!

  • @dasrotrad
    @dasrotrad 5 років тому +3

    I not only "Like" this video, I love it! Thank you... Hope you find some time to teach us some more!! VIELEN DANK!

  • @FoodTechLife
    @FoodTechLife 4 роки тому +2

    Just what I needed, thanks for making the video.

  • @wilsonfineart
    @wilsonfineart 5 років тому +3

    Another great video!
    During testing, I use an environment where the actual user impersonates another user with a different level of permissions. So, in my case, I have a function called MyEnviron() that wraps Environ(). If we are testing, MyEnviron returns something other than the real user. So one can see the value of wrappers. If I had written Environ("UserName") in the form config, the test would fail.

  • @skshafiq
    @skshafiq 2 роки тому +1

    ohh! Very easy way 👌 and very good.

  • @chjestheDroid
    @chjestheDroid 6 років тому +1

    Perfect simplicity! Worked for me on the first try! A meeeeeeeeeeeeeellion thank yous.

  • @jungjungdelosreyes4147
    @jungjungdelosreyes4147 3 роки тому +1

    Thank you sir. This what im looking for.

  • @hemad9354
    @hemad9354 4 роки тому +1

    You are awesome. Thank you for this video. this is very helpful

  • @thiruthiru1
    @thiruthiru1 6 років тому +2

    Nice. Your videos are really cool.

  • @Alex-zt6il
    @Alex-zt6il 5 років тому +1

    Thanks a lot, this will help track progress through my databases. Fantastic.

  • @jjcharlemag1712
    @jjcharlemag1712 4 роки тому +1

    After logging the Windows user is there a step by step to create user permissions to what the Windows user can access? There are UA-cam videos on creating User Permissions but not based on the Windows User, they are based on a user list created in the database, which requires a user login screen. Because of logging the Windows user I don’t need the user login screen in the database

    • @codekabinettcomen
      @codekabinettcomen  4 роки тому

      You would continue very much like any login dialog base solution. However, as you use the Windows login you do not use the login dialog to identify the user.

    • @jjcharlemag1712
      @jjcharlemag1712 4 роки тому

      @@codekabinettcomen Well I am very much interested in your version as I chose this video and was able to complete it.

  • @ausproto
    @ausproto Рік тому +1

    For some reason, despite following all of the steps, this doesn't work for me. It auto-populates the box with "#Name?".
    Any solutions? Thanks!

    • @codekabinettcomen
      @codekabinettcomen  Рік тому

      The #Name display usually is caused by a misspelled control or function name in the controlsource of the textbox.

  • @mikeybdos
    @mikeybdos 5 років тому +1

    Great video sir. I have been looking to do this exact thing in my access database. I have a question though, I created my database in access 2010 and had a text box showing the name of the person's login on the main screen now after opening it in office 365 I can't get the info to show up. I've check and all I can find is environ ("username") but I don't want the system name I want the user name based on the login. Thanks in advance.

    • @codekabinettcomen
      @codekabinettcomen  5 років тому +1

      Do I understand correctly, you want to display the Office 365 user name? - That is a very good question. - Unfortunately I cannot answer it right now. There seems to be no straight forward way to get to this information. I will reseach this and try to find a solution, but this may take time.

    • @mikeybdos
      @mikeybdos 5 років тому

      codekabinett.com/en thanks for your reply. I have a table within my database with the names of the users, their username and password. In office 2010 I was able to show the name of the current user based on their username for the database and not the user (environ) name of the computer user

  • @fdesarmes
    @fdesarmes 4 роки тому +2

    Thanks a lot, it's very Fantastic

  • @jjcharlemag1712
    @jjcharlemag1712 4 роки тому +1

    Thank You For This Tutorial

  • @ihsangadi6162
    @ihsangadi6162 4 роки тому +1

    Thanks for such nice videos, i loved your videos.
    I have question for multiuser login system.
    1. Created user registration form, any user can register by his own. By New user. Once his registration is complete, he can login.
    2. Bu for this I want user ID (login ID) for login purpose but not the actual name of any user. So I created query to create "User Name"(login ID) by using user First and last name
    3. Now I want use that "User name" /"login ID for the login form.
    Dont know how to connect that, because my user name is existing in query (userExtended) but not in User Table. So that user can login with loginID.

    • @codekabinettcomen
      @codekabinettcomen  4 роки тому

      This seems to be a design problem. If the two tables/queries are related, there has to be an attribute to link them together.

  • @patrickbevernage2919
    @patrickbevernage2919 6 років тому +1

    It works perfectly for an .accdb, but not for an .accde. Are there any other possibilities for an .accde?

    • @codekabinettcomen
      @codekabinettcomen  6 років тому

      This all should work in AccDE the same. Have you got any details on how exactly it does not work?
      Maybe there are security settings preventing the execution of VBA code. Can you put the AccDE in a trusted location?

  • @oliveroshea5765
    @oliveroshea5765 3 роки тому +1

    Danke danke danke Philipp

  • @JensT4
    @JensT4 5 років тому

    very good solution! works - but a little bit too long e.g. name conventions for txt fields...

  • @arix4901
    @arix4901 6 років тому +1

    Wonderful video...really deserve more views. Cool.... subscribed. expecting more...\

  • @eduardocoronado5145
    @eduardocoronado5145 4 роки тому

    Thank you so much for this video! It works for some of my users, but not all. Any suggestion what to do/check to resolve this?

    • @codekabinettcomen
      @codekabinettcomen  4 роки тому

      You need to provide more information on how exactly it does not work.
      Long shot: Maybe macros and VBA code are disable in Access for the users where it does not work?

    • @eduardocoronado5145
      @eduardocoronado5145 4 роки тому

      @@codekabinettcomen thank you for the reply. Turns out users were just hiting the do not trust warnings when opening. Thank you again for the video, works perfectly!

  • @KeffelewAssefa
    @KeffelewAssefa 2 роки тому +1

    Thank you

  • @ssdusd
    @ssdusd 3 роки тому

    Kindly can you show us how to do it by Microsoft Access query design maybe by (SQL)

    • @codekabinettcomen
      @codekabinettcomen  3 роки тому +1

      You can use the GetUserName function I showed in the video in a query. - If you cannot use any VBA at all, you're probably out of luck. The built-in Environ function is blocked from direct use in queries.

  • @stevefaulkner692
    @stevefaulkner692 5 років тому +1

    Good video - can anyone give us a tip to update user info on import multiple records (from excel) into access - I only get one record updating my user when I import multiple records. The date/time's for all records update as expected - user name on the first record only

    • @codekabinettcomen
      @codekabinettcomen  5 років тому

      I would think about linking the Excel sheet in a query (Keyword: IN (docs.microsoft.com/en-us/office/vba/access/concepts/miscellaneous/in-clause-microsoft-access-sql)) and the doing the actual import with an append query from linked sheet to the target table. In that append query you can add all sorts of information, like the user name.

  • @mividalocastudio9366
    @mividalocastudio9366 2 роки тому +1

    Genius

  • @ssdusd
    @ssdusd 3 роки тому +1

    Thanks Thanks Thanks Thanks Thanks
    Thanks Thanks Thanks Thanks Thanks
    Thanks
    Kindly can you show us how to make History table?

    • @codekabinettcomen
      @codekabinettcomen  3 роки тому +1

      I'll think about the history table. I've done that only with Sql Server so far...

    • @ssdusd
      @ssdusd 3 роки тому

      @@codekabinettcomen Kindly can you show Function in SQL for MS access Query that show Windows Username? I used CurrentUser() but I got "Admin" it does not show my UserName in windows. so do you have any helpful function for query. Thanks

    • @ssdusd
      @ssdusd 3 роки тому

      @@codekabinettcomen Can we insert the VBA Module in Tables instead of Forms?

    • @codekabinettcomen
      @codekabinettcomen  3 роки тому +1

      @@ssdusd , no you cant. But can use the datasheet view of a form. That looks like a table but has options to customize user interaction with VBA.

    • @ssdusd
      @ssdusd 3 роки тому +1

      @@codekabinettcomen Kindly can you show us how to do it in Query instead of forms? Plz!

  • @ssdusd
    @ssdusd 3 роки тому

    My VBA is blocked, so kindly can you do it in Macros and show us. Plz

    • @codekabinettcomen
      @codekabinettcomen  3 роки тому +1

      I'm not sure. I don't use macros at all and doing a video on them is currently not on my agenda.
      Thank you for the feedback nonetheless.