G
Guest
Im using the following snipet of code to populate a combo box with a list of
user IDs...
Dim objWorkSpace As Workspace
Set objWorkSpace = DBEngine.CreateWorkspace _("SPECIAL", "AdminUser",
"AdminPassword")
intCount = 0
cmbUserID.RowSource = objWorkSpace.Users(intCount).Name
For intCount = 1 To objWorkSpace.Users.Count - 1
Select Case objWorkSpace.Users(intCount).Name
Case "Creator", "Engine", "admin", "Admin" '***
Case Else
cmbUserID.RowSource = cmbUserID.RowSource & ";" & _
objWorkSpace.Users(intCount).Name
End Select
Next intCount
objWorkSpace.Close
Set objWorkSpace = Nothing
The line of code I've marked with *** is designed to prevent the user from
seeing any userIDs I feel would 'confuse' them (it doesnt take much to
'confuse' my users!)
Despite that line of code a User ID called admin (but not Engine or Creator)
always comes up in the combo box!
Can anyone explain why and how I can get rid of it?
Thanks in advance
Simon
user IDs...
Dim objWorkSpace As Workspace
Set objWorkSpace = DBEngine.CreateWorkspace _("SPECIAL", "AdminUser",
"AdminPassword")
intCount = 0
cmbUserID.RowSource = objWorkSpace.Users(intCount).Name
For intCount = 1 To objWorkSpace.Users.Count - 1
Select Case objWorkSpace.Users(intCount).Name
Case "Creator", "Engine", "admin", "Admin" '***
Case Else
cmbUserID.RowSource = cmbUserID.RowSource & ";" & _
objWorkSpace.Users(intCount).Name
End Select
Next intCount
objWorkSpace.Close
Set objWorkSpace = Nothing
The line of code I've marked with *** is designed to prevent the user from
seeing any userIDs I feel would 'confuse' them (it doesnt take much to
'confuse' my users!)
Despite that line of code a User ID called admin (but not Engine or Creator)
always comes up in the combo box!
Can anyone explain why and how I can get rid of it?
Thanks in advance
Simon