
Server not yet opened error
I have been struggling with this one for a while now.
I am using a reference to CRAXDRT and trying to print or export a report
from VB6 code. The report looks at an Access database that has a database
password assigned to it. I get a runtime error which says, "Server not yet
opened". I am setting the session info in the following code snippet
(showing the same line used two different ways, common sense dictates):
' Set the location and session info for each table (or query) in the
report
For Each crxTable In crxReport.Database.Tables
' Set the location of the database
** THIS LINE **
crxTable.SetTableLocation strAppPath & strDbName,
crxTable.Location, ""
** OR THE FOLLOWING LINE **
crxTable.SetTableLocation strAppPath & strDbName, "", ""
' Set the session info (database password)
crxTable.SetSessionInfo "Admin", Chr(10) & "mypassword"
Next
The code is in a DLL so I am not using an OCX on a form.
Any help would be greatly appresiated,
Corey