I have created the standard login form from VBs sample thing with the code:

VB Code:
  1. Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpbuffer As String, nSize As Long) As Long
  2.  
  3.  
  4. Public OK As Boolean
  5. Private Sub Form_Load()
  6.     Dim sBuffer As String
  7.     Dim lSize As Long
  8.  
  9.  
  10.     sBuffer = Space$(255)
  11.     lSize = Len(sBuffer)
  12.     Call GetUserName(sBuffer, lSize)
  13.     If lSize > 0 Then
  14.         txtUserName.Text = Left$(sBuffer, lSize)
  15.     Else
  16.         txtUserName.Text = vbNullString
  17.     End If
  18. End Sub
  19.  
  20.  
  21.  
  22. Private Sub cmdCancel_Click()
  23.     OK = False
  24.     Me.Hide
  25. End Sub
  26.  
  27.  
  28. Private Sub cmdOK_Click()
  29.     'ToDo: create test for correct password
  30.     'check for correct password
  31.     If txtPassword.Text = "" Then
  32.         OK = True
  33.         Me.Hide
  34.     Else
  35.         MsgBox "Invalid Password, try again!", , "Login"
  36.         txtPassword.SetFocus
  37.         txtPassword.SelStart = 0
  38.         txtPassword.SelLength = Len(txtPassword.Text)
  39.     End If
  40. End Sub

How would i get the users and passwords in there?

And I would like it so that they can edit their passwords and create new users etc.