juddymarch
Technical User
- Aug 10, 2007
- 17
Hi, I have computer running "windows server 2003 Standard edition."
In order to create a new user account I go through the process of: Start/Control Panel/Administrative Tool/Computer Management then
Under System Tools/Local Users and Groups/Users/Add new user.
I need to be able to automate this process from within an access form? I cant seem to find code to do it, I have been playing around with the following code but no luck.
Dim Container
Dim ContainerName
Dim User
Dim NewUser
ContainerName = InputBox("Enter the Domain Name:")
NewUser = InputBox("Enter the new user name:")
Set Container = GetObject("WinNT://" & ContainerName)
Set User = Container.Create("User", NewUser)
User.SetInfo
I'm abit lost as to what domain name to enter. And don't even know if the code would work if I have the correct domain name. Any advice would be greatly appreciated.
Thanks
Justin
In order to create a new user account I go through the process of: Start/Control Panel/Administrative Tool/Computer Management then
Under System Tools/Local Users and Groups/Users/Add new user.
I need to be able to automate this process from within an access form? I cant seem to find code to do it, I have been playing around with the following code but no luck.
Dim Container
Dim ContainerName
Dim User
Dim NewUser
ContainerName = InputBox("Enter the Domain Name:")
NewUser = InputBox("Enter the new user name:")
Set Container = GetObject("WinNT://" & ContainerName)
Set User = Container.Create("User", NewUser)
User.SetInfo
I'm abit lost as to what domain name to enter. And don't even know if the code would work if I have the correct domain name. Any advice would be greatly appreciated.
Thanks
Justin