Rabu, 28 September 2011

[MS_AccessPros] Re: Compacting 2007 Access DB via an Event

 

Thomas

The Compact & repair i savailable without using the compact on close option. I don't have 2007 installed, but in 2010 the compact is under the database tab.

If I remember right in 2007, you click on the Office button>database tools, but that is just a guess at this point.

Bill

--- In MS_Access_Professionals@yahoogroups.com, "Thomas" <thomas_lam_us@...> wrote:
>
> Hi Bill,
>
> In 2003, I can use combination of CommandBars and Controls to navigate via the menu and then use accDoDefaultAction to simulate a compact operation.
>
> Can we do the same thing in 2007? It appears 2007 doesn't allow you to compact while the DB is open. It allows you to check off the box and will then compact the DB on closing. Are we able to simulate this prorammatically via code as a routine instead of having to request the user to do it.
>
> Appreciate your inputs.
>
> Thanks.
> Thomas
>
> --- In MS_Access_Professionals@yahoogroups.com, "Bill Mosca" <wrmosca@> wrote:
> >
> > Thomas
> >
> > You can't easily compact from code. The only way to do it through code is to make a copy, compact that, delete the original and then rename the new one to the original name.
> >
> > It really isn't worth the effort unless you just don't have someone competent enough to compact the DB without opening it. That can be done by just opening Access and selecting the file to compact. No menus are involved in your application since it is never really opened for compacting.
> >
> > Regards,
> > Bill Mosca, Founder - MS_Access_Professionals
> > http://www.thatlldoit.com
> > Microsoft Office Access MVP
> > https://mvp.support.microsoft.com/profile/Bill.Mosca
> >
> >
> >
> > --- In MS_Access_Professionals@yahoogroups.com, "Thomas" <thomas_lam_us@> wrote:
> > >
> > > Instead of exposing the menu, how do you compact the Access DB via VBA?
> > >
> > > Thanks,
> > > Thomas
> > >
> >
>

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar