Table Names

C

cronse

I made an access datebaste for people to enter their overtime in for
work. At the end of each pay period the data is exported into another
access database as a table with the name of the date of the end of the
pay period. In that database I have another table called YearToDate.
I want that table to contain all the information from each of the
different pay periods. I am not sure if I am going about this the
right way but I am trying to use a button that will clear the year to
date table and then uses the following append query to add the data
back into the YearToDate table:

INSERT INTO YearToDate
SELECT *
FROM 61107;

The problem is that there is new date added every two weeks. Is there
a way to create an array of the table names so that I can use that
array to run the SQL statement?

Thank you in advance,

Christopher Ronse
 
S

Stefan Hoffmann

hi Christopher,

At the end of each pay period the data is exported into another
access database as a table with the name of the date of the end of the
pay period.
Store the pay period in your table, not in the table name.


mfG
--> stefan <--
 
K

Klatuu

If you are creating a table for each pay period, you need to change how you
are doing it. You should have only one table in which to store the data.
All you need is a field with the pay period date. Then use a query as the
record source for your form that filters the data to include only the current
pay period.
Having multiple tables with names including dates or anyother meaningful
information makes reporting or any other use of the tables a real nightmare.
The name of a table or any object within Acces should contain no information
other than to identify the table and the use of the table.
 

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