Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to check if a user belong to a particular domain

Posted on 2004-03-22
5
Medium Priority
?
207 Views
Last Modified: 2010-05-01
I want to check if a user belong to a particular domain.

How can I go about it.

Please provide sample codes if possible
Thanks
0
Comment
Question by:snowei1
5 Comments
 
LVL 26

Accepted Solution

by:
EDDYKT earned 200 total points
ID: 10657210
Private Sub Command1_Click()
Dim myobj, user

Set myobj = GetObject("WinNT://yourdomainname")
myobj.Filter = Array("user")
For Each user In myobj
  Debug.Print user.Name & " " & user.Parent & " " & user.AccountDisabled
Next

End Sub
0
 
LVL 1

Assisted Solution

by:MADisonMAN
MADisonMAN earned 200 total points
ID: 10662032
Check the following site. This will helps you for this question as well as understanding some basics.
http://www.15seconds.com/issue/020130.htm
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

963 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