Connecting Tech Pros Worldwide Forums | Help | Site Map

Clear Database

Houston
Guest
 
Posts: n/a
#1: Nov 13 '05
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
Guest
 
Posts: n/a
#2: Nov 13 '05

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@pcdatasheet.com
www.pcdatasheet.com



"Houston" <houston@hbip.com> wrote in message
news:LI_Pc.72$Qg3.46@newssvr24.news.prodigy.com...[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]


PC Datasheet
Guest
 
Posts: n/a
#3: Nov 13 '05

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@pcdatasheet.com
www.pcdatasheet.com


"Houston" <houston@hbip.com> wrote in message
news:LI_Pc.72$Qg3.46@newssvr24.news.prodigy.com...[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]


Closed Thread


Similar Microsoft Access / VBA bytes