Determine Which network user is logged into

Posted on 2005-04-10
Last Modified: 2010-05-02
I have a MS MDE that connects to a SQL back-end. I need to be able to determine if the user is logged into the network or is logging in through the VPN. Is there a way to do this and if so how? Additionally, is there a way to automatically call the VPN connection if the user is not logged into the network from within the building?

Currently connections are made through ODBC. Initially the user is asked to build the connection and the settings are stored in the registry (ie NT security or SQL security). NT is obviously chosen for in-house users and SQL is chosen for users who must access the system via VPN. I just need to know how to detect these different types to eliminate errors the user would not understand.

Thanks in advance!
Question by:jamieschaller
    LVL 14

    Expert Comment

    by:Shiju Sasidharan
    hi try this

    Retrieving User, Share and Share User Name for Network Resources

    LVL 14

    Expert Comment

    by:Shiju Sasidharan
    Obtaining Workstation Configuration and Current User
    LVL 14

    Accepted Solution


    Obtaining Workstation User Logon Information

    Obtaining Workstation Configuration and User Logon Information

    Author Comment

    I ended up going with this:

    This gave me exactly what I was looking for, just the domain name, which will allow me to code additional calls for VPN users. Thanks for the suggestions!

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Introduction While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
    If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now