603 or compact using syscmd 602 in A2K

  • Thread starter Thread starter david epsom dot com dot au
  • Start date Start date
D

david epsom dot com dot au

Is anyone here using this (or 603) in A2K? It's not working for me...
I don't get an error message, but nothing happens

Sub DoCompact()
Dim accApp As Access.Application
Set accApp = New Access.Application
accApp.SysCmd 602, "c:\db3.mdb", "c:\tmp.mde"
Debug.Print accApp.SysCmd(602, "c:\db3.mdb", "c:\tmp.mde")

Set accApp = Nothing

End Sub



(david)
 
Hi David,

I can't find a reference to the values 602, 603 used with
the SysCmd method listed anywhere. Are you sure they are
valid? I do believe however that 603 is not supported in
Access 2000. You could try the resolution in the
Microsoft article below but guess what? It uses
Sendkeys.....nightmare

http://support.microsoft.com/?id=202039
(ACC2000: How to Programmatically Save a Database or
Project as an MDE or ADE File)

hth

chas
-----Original Message-----
Is anyone here using this (or 603) in A2K? It's not working for me...
I don't get an error message, but nothing happens

Sub DoCompact()
Dim accApp As Access.Application
Set accApp = New Access.Application
accApp.SysCmd 602, "c:\db3.mdb", "c:\tmp.mde"
Debug.Print accApp.SysCmd
(602, "c:\db3.mdb", "c:\tmp.mde")
 
I use CreateObject rather than New, as follows in Access 2k:

Dim appAccess As Access.Application
Set appAccess = CreateObject("Access.Application." &
Left$(SysCmd(acSysCmdAccessVer), 1))
appAccess.Visible = True
appAccess.SysCmd 603, strDbFile, strMdeFile
appAccess.Quit acQuitSaveNone
Set appAccess = Nothing

- Steve
 
Back
Top