thanks a lot, but I get confused....it does not work on my access 2000. Very
strange thing.
anybody got an idea?
Paul
"Trevor Best" <nospam@localhost>
??????:40c8b8f7$0$26618$afc38c87@auth.uk.news.easy net.net...[color=blue]
> Paul T. Rong wrote:
>[color=green]
> > Dear all,
> >
> > My aim is to compact and repair current database, I got the following[/color][/color]
code[color=blue][color=green]
> > from
http://www.mvps.org/access/general/gen0041.htm
> >
> > Option Compare Database
> >
> > ' ***** Code Start *****
> > Public Sub CompactDB()
> >
> > CommandBars("Menu Bar"). _
> > Controls("Tools"). _
> > Controls("Database utilities"). _
> > Controls("Compact and repair database..."). _
> > accDoDefaultAction
> >
> > End Sub
> > ' ***** Code End *****
> >
> > '-----------------------------------------------------
> >
> > 'then I made a form, and a command button "command1"
> >
> > Private Sub command1_Click()
> > Call CompactDB
> > End Sub
> >
> > '-------------------------------
> > but when I click on the command button, there occured a error message[/color][/color]
no. 5.[color=blue][color=green]
> > something like "invalid process ...."
> >
> > where I made mistake?
> >
> >
> >
> >[/color]
> From the code you posted, nowhere, it works fine (I just copied and
> pasted it and tried). Your problem must lie elsewhere or there's
> something else about your environment that's influencing it.
>
>
>
> --
> Error reading sig - A)bort R)etry I)nfluence with large hammer[/color]