OpenCurrentDatabase

That simple! Thanks a lot. The help section for UserControl implies that it's a read only variable, not one I can set.
I think you didn't read far enough:
Access VBA Help File said:
This property is read-only in all views when user starts the Access application. If Microsoft Access is started by OLE Automation, the UserControl property can be set in Visual Basic.

And by OLE automation that includes your CODE. The user starts the application by clicking on the shortcut to start Access or from the quick launch bar/taskbar, etc.
I'm noticing that Application.CloseCurrentDatabase still closes the MDB, but I leave open the newer instance of Access. Do you think if I just Set Application = Nothing without the .CloseCurrentDatabase, it will still fully relinquish control, so I don't have the .ldb and the re-opening problems?
You need to use

objAccess.UserControl = True

Set objAccess = Nothing

(or whatever your object is)
 
objAccess.UserControl = True

Set objAccess = Nothing

(or whatever your object is)

Which is exactly what I am now doing. That one line about control is so stuck in the middle, right under the chart, that I did in fact gloss over it. Didn't help that the example was solely for the read only scenario, either. :)

Thanks again Bob.
 

Users who are viewing this thread

Back
Top Bottom