Rxport and rename table

B

Boss

Hi,

I am preparing a databse (MIS) which keeps details of work done of about 150
employees.
Idea is that i import lot of data from excel and other systems into the
database and daily i generate a "daily final report".

Point i am stuck is:- I am unable to rename table using today() command. But
I can rename it using now() command.

Could somebody help me with two things.

First: A code which renames my final report (MS access table) named as
"final" with today's date. The report table s daily named as "final". so the
code should directly go and rename "final" table into date.

Second: A code which can export all the tables into one excel sheet, with
each table in one worksheet. Please do not advise tradnsferspreadsheet
function because i wish to prepare a monthly report with details of all the
30 days. Each spreadsheet being one day in excel.

Any help us deelpy respected. This community has helped me in each and every
small or big project. I have learned a lot from this forum. Hats off to all.

Thanks!
Boss
 
P

pietlinden

Hi,

I am preparing a databse (MIS) which keeps details of work done of about 150
employees.
Idea is that i import lot of data from excel and other systems into the
database and daily i generate a "daily final report".

Point i am stuck is:- I am unable to rename table using today() command. But
I can rename it using now() command.

Could somebody help me with two things.

First: A code which renames my final report (MS access table) named as
"final" with today's date. The report table s daily named as "final". so the
code should directly go and rename "final" table into date.

You could use a make table query to do this and just generate the
table name in code. Would that not work?
Also, if you included a datestamp field in your table, you should be
able to include all the records in a single table and then index it on
(say) the date field and a couple of others that you filter/sort on.
Then you could just have one big table that you process with the same
code.
Second: A code which can export all the tables into one excel sheet, with
each table in one worksheet. Please do not advise tradnsferspreadsheet
function because i wish to prepare a monthly report with details of all the
30 days. Each spreadsheet being one day in excel.

You could use the CopyFromRecordset method outlined here:
http://www.mvps.org/access/modules/mdl0035.htm
"Transferring Records to Excel with Automation"

It covers transferring data to various parts of a spreadsheet -
different ranges, tabs etc.
 
B

Boss

Thanks for the reply but the code in the excel link didin;t worked. Please
hepl.

Thanks!
 
P

pietlinden

Thanks for the reply but the code in the excel link didin;t worked. Please
hepl.

If you want help, you have to give more information than that... What
does "didn't work" mean? What exactly did you do?
 
B

Boss

I have changed the process... now i am preparing one master table with one
row as date function.

Thanks a lot for the prompt reply and help..

Thanks!
Boss
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top