Export a table daily

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a database where I have multiple table objects. I have a form
that adds data to my main table called TEST. I created a Crystal Report that
reads data from this TEST table. I want to be able to save, delete, and
update this table on a daily basis. For example, I would like to save a copy
of the data from TEST for today, and name it 060825de. Then, I would like to
save the structure of my table;however, I would like to delete the data from
my TEST table daily. How would I do this? I appreciate any feedback.

lavatress
 
Why do you want to go through all of this when you could save all the data in
one table, setting a test_date field default to the current date and then
filtering the table on the current date for your reports?
What happens if you want to do a week's summary and have to combine seven
tables much less if you want to do a yearly summary and have to combine the
data from 365 tables.
 
Let me give you a clearer understanding what I am trying to do. I work for a
Court System. One of our division will be entering tickets into this
database. Then, the information will be imported to Crystal Reports. Next,
this information will go into our Sustain system which is the backend for the
Pervasive Database. Sustain has to have data formated in a particular way. I
want to be able to save a copy of the data from the TEST table for that
specified day, in case we may have to reimport this data or retreive some
information. I know I can do it the way you are talking about, but I have to
have it done this way? Can you help?
 
Can anyone help me with this problem?

Lavatress said:
Let me give you a clearer understanding what I am trying to do. I work for a
Court System. One of our division will be entering tickets into this
database. Then, the information will be imported to Crystal Reports. Next,
this information will go into our Sustain system which is the backend for the
Pervasive Database. Sustain has to have data formated in a particular way. I
want to be able to save a copy of the data from the TEST table for that
specified day, in case we may have to reimport this data or retreive some
information. I know I can do it the way you are talking about, but I have to
have it done this way? Can you help?
 
You can export the contents of a table to a text file or Excel worksheet
by using the VBA methods DoCmd.TransferText or DoCmd.TransferSpreadsheet
respectively.

Or you can export the table to another Access mdb file by using
DoCmd.TransferDatabase (but while TransferText and TransferSpreadsheet
can create new files, TransferDatabase can only export to an existing
database).

You can then use a Delete query to delete the records from the TEST
table, leaving its structure.

Be sure to compact-and-repair the database regularly.

It sounds as if this Access application is used only to process data en
route to your Sustain system. In that case, it's reasonable to treat
your main table as a "staging" table, regularly populated and then
emptied. But if you're also using it as a data store, I'd join others
and advise against doing it this way.
 
Back
Top