Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Compact DB

Discussion in 'Information Technology' started by Tom, Jul 28, 2006.

Tags:
  1. Tom

    Tom
    Expand Collapse
    Guest

    Hi all,

    I have a button that run a vb query statement to delete records.
    I would like to compact the DB after deletion.

    1. is it recommended?
    2. what code line I should add?

    Thanks,
    Tom
     
  2. Tom

    Tom
    Expand Collapse
    Guest

    I found: Me.Application.CompactRepair
    It`s sound right, but will it do the job?

    Thanks,
    Tom
    "Tom" <partner1973@yahoo.com> wrote in message
    news:u6VSEUVfGHA.1324@TK2MSFTNGP04.phx.gbl...
    > Hi all,
    >
    > I have a button that run a vb query statement to delete records.
    > I would like to compact the DB after deletion.
    >
    > 1. is it recommended?
    > 2. what code line I should add?
    >
    > Thanks,
    > Tom
    >
     
  3. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    You cannot use the CompactRepair method to compact a database if it's
    currently open. However, if you've followed proper design, so that your
    application is split into a front end (containing the queries, forms,
    reports, macros and modules), linked to a back end (containing the tables
    and relationships), the front end can compact the back end (provided, of
    course, that the back end isn't current in use: you can tell by whether or
    not the ldb locking file exists for the back end)

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "Tom" <partner1973@yahoo.com> wrote in message
    news:%233%23G%23QWfGHA.1204@TK2MSFTNGP02.phx.gbl...
    >I found: Me.Application.CompactRepair
    > It`s sound right, but will it do the job?
    >
    > Thanks,
    > Tom
    > "Tom" <partner1973@yahoo.com> wrote in message
    > news:u6VSEUVfGHA.1324@TK2MSFTNGP04.phx.gbl...
    >> Hi all,
    >>
    >> I have a button that run a vb query statement to delete records.
    >> I would like to compact the DB after deletion.
    >>
    >> 1. is it recommended?
    >> 2. what code line I should add?
    >>
    >> Thanks,
    >> Tom
    >>

    >
    >
     
  4. Tom

    Tom
    Expand Collapse
    Guest

    Thanks.

    "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    news:%2395cM8YfGHA.4464@TK2MSFTNGP04.phx.gbl...
    > You cannot use the CompactRepair method to compact a database if it's
    > currently open. However, if you've followed proper design, so that your
    > application is split into a front end (containing the queries, forms,
    > reports, macros and modules), linked to a back end (containing the tables
    > and relationships), the front end can compact the back end (provided, of
    > course, that the back end isn't current in use: you can tell by whether or
    > not the ldb locking file exists for the back end)
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no private e-mails, please)
    >
    >
    > "Tom" <partner1973@yahoo.com> wrote in message
    > news:%233%23G%23QWfGHA.1204@TK2MSFTNGP02.phx.gbl...
    >>I found: Me.Application.CompactRepair
    >> It`s sound right, but will it do the job?
    >>
    >> Thanks,
    >> Tom
    >> "Tom" <partner1973@yahoo.com> wrote in message
    >> news:u6VSEUVfGHA.1324@TK2MSFTNGP04.phx.gbl...
    >>> Hi all,
    >>>
    >>> I have a button that run a vb query statement to delete records.
    >>> I would like to compact the DB after deletion.
    >>>
    >>> 1. is it recommended?
    >>> 2. what code line I should add?
    >>>
    >>> Thanks,
    >>> Tom
    >>>

    >>
    >>

    >
    >
     

Share This Page