List User Accounts

  • Thread starter Scott Whetsell, A.S. - WVSP
  • 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?
 
J

Joan Wild

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
 
S

Scott Whetsell, A.S. - WVSP

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top