List User Accounts

  • Thread starter Thread starter Scott Whetsell, A.S. - WVSP
  • Start date Start date
S

Scott Whetsell, A.S. - WVSP

I would like to populate a multi-select listbox with a listing of all the
users in my mdw file.

How do i target the mdw and populate my listbox?
 
Dim wrk As Workspace
Dim strUserName As String
Dim usr As User

Set wrk = DBEngine(0)

For Each usr In wrk.Users
If usr.Name <> "Creator" And usr.Name <> "Engine" Then
strUserName= strUserName & ";" & usr.Name
End If
Next

ListBoxName.RowSource = strUserName

Set wrk = Nothing
 
Excellent code, thank you.

Joan Wild said:
Dim wrk As Workspace
Dim strUserName As String
Dim usr As User

Set wrk = DBEngine(0)

For Each usr In wrk.Users
If usr.Name <> "Creator" And usr.Name <> "Engine" Then
strUserName= strUserName & ";" & usr.Name
End If
Next

ListBoxName.RowSource = strUserName

Set wrk = Nothing
 
Back
Top