Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I open a database in code that was encrypted using another workgroup file?

0
Posted

How can I open a database in code that was encrypted using another workgroup file?

0

The unsupported privDBEngine object allows you to connect to another database in code. This does not open the database by starting an instance of Access, so you only have access to Jet objects (tables and queries). You can work with any DAO objects. Sub OpenDBWithNewWorkgroupFile(strPathToFile As String, _ strDefaultUser As String, _ strDefaultPwd As String, _ strPathToDatabase As String) ‘ This function uses the unsupported PrivDBEngine object to ‘ open a database using a different workgroup information file ‘ than the one being used as the default. You might do this if ‘ you want to access data that is in a encrypted database that uses ‘ a different workgroup information file. Dim dbe As PrivDBEngine Dim wrk As Workspace Dim dbs As Database ‘ Return a reference to a new instance of the PrivDBEngine object. Set dbe = New PrivDBEngine ‘ Set the SystemDB property to specify the workgroup file. dbe.SystemDB = strPathToFile dbe.DefaultUser = strDefaultUser dbe.DefaultPassword = strDefault

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123