with an access database, how do i open it if it has a password on it?
Printable View
with an access database, how do i open it if it has a password on it?
Hi,
this code may do the trick:
Set pWorkspace = Workspaces(0)
Set pDatabase = pWorkspace.OpenDataBase(App.path & "\" & pDatabasName, False, False, ";PWD=whatever")
OpenDataBase = True
Mike
da_silvy, again, this uses DAO, but...
Dim DB as database 'need project menu > reference to ms DAO 3.5 library here
Set DB = OpenDatabase("Path&Name_OF-DB_Here.mdb", False, False, ";Pwd=Password_here")
Hope this helps! :p