yes I do know the password because it is my work Dcrake.
can you teach me how to do that or what that vba code is.....
I have found this but i dont know if this is...............
Option Compare Database
Option Explicit
Sub OpenPasswordProtectedDB()
'Define as Static so the instance of Access
'doesn't close when the procedure ends.
Static acc As Access.Application
Dim db As DAO.Database
Dim strDbName As String
strDbName = "C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb"
Set acc = New Access.Application
acc.Visible = True
Set db = acc.DBEngine.OpenDatabase(strDbName, False, False, ";PWD=nwind")
acc.OpenCurrentDatabase strDbName
db.Close
Set db = Nothing
End Sub
OR ----------------------------
Public Function OpenPasswordProtectedDatabase(DBPath As String, _
Password As String) As Object
'Usage: Open Password protected database
'Parameters: DBPath: Full Path to Access Database
'Password: the Password
'returns the database, in it's open state if successful.
'Otherwise return value will evalute to nothing
On Error Resume Next
Dim db As DAO.Database
Set db = DAO.OpenDatabase(DBPath, False, False, _
";pwd=" & Password)
If Err.Number = 0 Then
Set OpenPasswordProtectedDatabase = db
Else
Set OpenPasswordProtectedDatabase = Nothing
End If
End Function
that was just sample of what i have researched in the net.