Hello All:
I also have posted this under microsoft.public.vb.database, haven't
gotten any response. I am hoping I have
a better luck here, I hope.
I have created a database (access 2007) that is entirely driven by
forms. I want all users to interact through forms and input data and
or information in the tables. it is all working fine. My issue is
that if I password protect the database(Open Exclusive). I need to
pass the password some how through forms and or VB code to open the
database and let users work with the forms and do their thing. I
came
up with two simple option relizing that I can expand the forms to
incorporate a user and password approach, but in retrospective our
group is very small and the following method works well and less
coding.
1) use command line switches (/pwd) and pass the password. embed
this
into a Console application. and give users a single X.exe to open the
database, but I found out that /pwd is no longer available in access
2007. so this brings me to option two which I stuck on.......
2)utilizing the same CounsoleApplication but some how pass the
password programmaticly. I have searched and serched and all options
are using ODBC and I wonder is there a way to just pass the password
once the dialog box shows up. this is the code I am using to open
the
database.
---------------------Start code--------------
Module Module1
Sub Main()
OpenMicrosoftAccess("C:\GWM\CallTracker\Development_Files
\Ver-3.1\SC_Testing.accdb")
End Sub
''' <summary>
''' Open the path parameter with Microsoft Access.
''' </summary>
Private Sub OpenMicrosoftAccess(ByVal f As String)
Dim startInfo As New ProcessStartInfo
startInfo.FileName = "MSACCESS.EXE"
startInfo.Arguments = f
Process.Start(startInfo)
End Sub
Private Function OpenMicrosoftAccess(ByVal DBPath As String,
ByVal
p2 As Boolean, ByVal p3 As Boolean, ByVal p4 As String) As DataSet
Throw New NotImplementedException
End Function
End Module
-----------------------------End Code------------