help on database password

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi. We have an old archive database.
Is there a way to open this file?

Im getting a message that i dont have
admin priviledges to access the file

We neet to see on some important records and info
from that database

TIa
 
See if this works.


'Open a Password Protected Access Database
' #Mandix Repository#*****************************************************
' * Programmer Name : FreeVBCode
' * Web Site : http://www.freevbcode.com/ShowCode.Asp?ID=353
' * E-Mail : (e-mail address removed)
' * Date : 21/10/1999
' * Time : 09:27
' **********************************************************************
' * Comments : Open a Password Protected Access Database
' *
' *
' **********************************************************************
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top