I have an application in which the connection object is houseed within
the MDI parent form. I have attached a command to a child form that
should allow the user to compact the database to a new location of their
choice. However, I keep getting run time error 3356 when my program
tries to execute the compactdatabase command. Does anyone know of a
I have included the code below:
Private Sub cmdExport_Click()
' Set filters.
CommonDialog1.Filter = "Microsoft Access Databases (*.mdb)|*.mdb"
' Display the Open dialog box.
Outpath = CommonDialog1.FileName
If Outpath = "" Then
DBEngine.CompactDatabase MDIForm1.path, Outpath
Prior to this form loading I close the database connection as follows:
set MDIForm1.cn = nothing
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!