K
KS Wong
Dear all,
I'm writing an Access front-end application using ADO to access an Access
backend database. I use the default access security system in the working
environment. Thus everytime when the user starts up the application, he/she
will be asked to login the Access session with user ID and password before
the actual codes of the application run (user ID and password are stored in
system.mdw). To make the connection to the backend database, I need to
configure the parameters of ADO object as below: -
Set adoConn = CreateObject("adodb.connection")
With adoConn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Properties("Data Source").Value = "dbLocation"
.Properties("Jet OLEDBatabase Password").Value = "Backend Password"
.Properties("Jet OLEDB:System Database").Value = "System.mdw"
.Properties("User ID").Value = CurrentUser
.Properties("Password").Value = ????
.Open
End With
I can pass the user ID of current user by using the 'CurrentUser' but don't
know how to pass the password of current user to the 'Password' property of
ADO. Without the 'User ID' and 'Password' parameters, it cannot open the
connection.
Thanks in advance.
I'm writing an Access front-end application using ADO to access an Access
backend database. I use the default access security system in the working
environment. Thus everytime when the user starts up the application, he/she
will be asked to login the Access session with user ID and password before
the actual codes of the application run (user ID and password are stored in
system.mdw). To make the connection to the backend database, I need to
configure the parameters of ADO object as below: -
Set adoConn = CreateObject("adodb.connection")
With adoConn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Properties("Data Source").Value = "dbLocation"
.Properties("Jet OLEDBatabase Password").Value = "Backend Password"
.Properties("Jet OLEDB:System Database").Value = "System.mdw"
.Properties("User ID").Value = CurrentUser
.Properties("Password").Value = ????
.Open
End With
I can pass the user ID of current user by using the 'CurrentUser' but don't
know how to pass the password of current user to the 'Password' property of
ADO. Without the 'User ID' and 'Password' parameters, it cannot open the
connection.
Thanks in advance.