Clear Database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Houston

    Clear Database

    I have a database that needs to be cleared (no records in it) once a week on
    a specific day. Is there some way to generate a command that will do this or
    some other way perhsps?

    Cheers
    Houston


  • PC Datasheet

    #2
    Re: Clear Database

    Use Windows Task Scheduler to start Access once a week on a specific day. Use an
    autoexec macro or the Open event of a blank form to run a series of delete
    queries to remove all your data. Finally compact the database to make all the
    autonumber primary keys restart at 0. Contact me at my email address below if
    you would like me to set this up for you. My fees are very reasonable.

    --
    PC Datasheet
    Your Resource For Help With Access, Excel And Word Applications
    resource@pcdata sheet.com




    "Houston" <houston@hbip.c om> wrote in message
    news:LI_Pc.72$Q g3.46@newssvr24 .news.prodigy.c om...[color=blue]
    > I have a database that needs to be cleared (no records in it) once a week on
    > a specific day. Is there some way to generate a command that will do this or
    > some other way perhsps?
    >
    > Cheers
    > Houston
    >
    >[/color]


    Comment

    • PC Datasheet

      #3
      Re: Clear Database

      I thought some more about this as I read the posts today. Bulk deleting all the
      records and adding new records to a database is not a good idea. You will find
      that the file size exponentially grows in size. The better alternative is to
      create a blank database then each week delete your existing database, make a
      copy of the blank database and rename the copy to the name of the original
      database.

      --
      PC Datasheet
      Your Resource For Help With Access, Excel And Word Applications
      resource@pcdata sheet.com



      "Houston" <houston@hbip.c om> wrote in message
      news:LI_Pc.72$Q g3.46@newssvr24 .news.prodigy.c om...[color=blue]
      > I have a database that needs to be cleared (no records in it) once a week on
      > a specific day. Is there some way to generate a command that will do this or
      > some other way perhsps?
      >
      > Cheers
      > Houston
      >
      >[/color]


      Comment

      Working...