VBANewBie :)
Member
- Local time
- Today, 14:57
- Joined
- Apr 14, 2021
- Messages
- 88
Hello Everyone , I use this code to convert unprotected accdb to accde :
It works fine but I need to modify it to work with password protected accdb and pass the database password without showing the access input box for password .
Thanks
Code:
Function Convert()
Dim sourcedb, targetdb, nametargetdb As String
Dim MyPath As String
MyPath = Application.CurrentProject.Path
sourcedb = MyPath & "\Baseet.accdb"
targetdb = "D:\tt2.accde"
nametargetdb = MyPath & "\Baseet.accde"
Dim accessApplication As Access.Application
Set accessApplication = New Access.Application
With accessApplication
.SysCmd 603, sourcedb, targetdb
End With
Kill sourcedb
Name targetdb As nametargetdb
FollowHyperlink nametargetdb
DoCmd.Quit
End Function
Thanks