User Group Within VB
Posted on 2003-03-23
I am connecting to an Access database (Survery.MDB) using a security database (Survey.MDW). This is done using ADO 2.6. However I want to implement user level security within the VB program itself. I.e. Create, delete users, change user passwords, change user groups, etc. I am not quite sure how to do this. I know that using DAO 3.6, I can access user groups and User names, but that is for a workspace.
ACC2: Only Admins Group Members Can List Groups They Belong To
Function GetGroups ()
Dim W As WorkSpace, US As String, U As User, i As Integer, j As Integer
Set W = DBEngine.Workspaces(0)
US = CurrentUser()
Set U = W.Users(US)
For j = 0 To U.Groups.Count - 1
Debug.Print " " & U(j).Name
I am wondering how I can set the workspace to point to a specific database.
W.OpenDatase "C:\Survey.MDB", , , "Jet OLEDB:System database=""C:\Survey.MDB"""
but this does not show all the users in that database. What is wrong with this?