Populate Data

Idris

Registered User.
Local time
Tomorrow, 00:47
Joined
Nov 9, 2005
Messages
67
Dear Friends,

Yaar! I have two .MDB files, both are password protected - is there anyway i can call the data from second .MDB file using recordsets.

I know the password to both the files.
 
Have you tried just linking the tables from the other mdb?
 
No I don't want to link the tables bcoz its has Credit Notes info about customers, the script which i have works well without password is as below:

Private Sub AccessCreditNotes()

Dim dbsBackEnd As Database
Dim rst1 As Recordset
Dim FileLocation As String

FileLocation = "\\Server\Access\Credit Notes ver2000.mdb"

Set dbsBackEnd = DBEngine.Workspaces(0).OpenDatabase(FileLocation)
Set rst1 = dbsBackEnd.OpenRecordset("DrCr Note", dbOpenDynaset)

Do While Not rst1.EOF
Debug.Print rst1!DrCrNoteNo, rst1!DivOnly, rst1!ShortDesc
rst1.MoveNext
Loop

rst1.Close
Set dbsBackEnd = Nothing

End Sub
 

Users who are viewing this thread

Back
Top Bottom