Connecting Tech Pros Worldwide Help | Site Map

Date stamp on tables

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 05:20 AM
alpha_male
Guest
 
Posts: n/a
Default Date stamp on tables

Thank you, Wayne, for your answer. That was exactly what I needed.
There was tiny mistake strSQL statement (Table1.* should be tblHello.*
).
To answer your question why I need this. I have table in accounting
program and in order to track changes in the VAT, I have made queries
which would track these changes. I had to only indicate which
tables(they have the same structure) I need to compare. After each
month I am planning to run your code in order to solidify the tables
from linked tables from accounting programm.

Ivars







You could run a Make Table query.

strSQL = "SELECT Table1.* INTO tblHello" & Format(Date, "ddmmyy") & "
FROM
tblHello;"
CurrentDb.Execute strSQL, dbFailOnError

For sorting purposes, you may prefer "yymmdd". This will sort these
tables
chronologically in the database window. Since you said this would be
run on
the 31st, I used the Date function. You could also specify a
particular date
if you wished. This will also include the data from the linked table.

Now, for the real question. Why are you doing this? If you're just
wanting
to segregate items performed during certain months, then it would be
better
to have a date field in each record that tells you what date it was
performed and use a query to limit your results to the desired date or
date
range.

--
Wayne Morgan
MS Access MVP


"alpha_male" <alpha_male@inbox.lv> wrote in message
news:64a041a4.0412130531.1ff5fe09@posting.google.c om...[color=blue]
> Can anybody help to create code which would
> create new table from linked table and additionally will add date
> stamp for the name of new table? For example tblHello is linked table
> and the code would create a table tblHello311204 at the 31st december
> of 2004.[/color]

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.