A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Daily Make Table Query



 
 
Thread Tools Display Modes
  #1  
Old May 11th, 2010, 08:16 PM posted to microsoft.public.access.queries
JD
external usenet poster
 
Posts: 199
Default Daily Make Table Query

I have a Make Table Query that I will need to run every morning. Is there
anyway to have the query add today's date to the name of the table (without
going in and changing it everyday) so that the new table won't overwrite
yesterday's table?
  #2  
Old May 11th, 2010, 08:28 PM posted to microsoft.public.access.queries
xps35
external usenet poster
 
Posts: 22
Default Daily Make Table Query

=?Utf-8?B?SkQ=?= wrote:


I have a Make Table Query that I will need to run every morning. Is there
anyway to have the query add today's date to the name of the table (without
going in and changing it everyday) so that the new table won't overwrite
yesterday's table?


In VBA you can use a command like:
DoCmd.RunSQL "SELECT * INTO T" & Format(Date, "yyyymmdd") & " FROM T1"

--
Groeten,

Peter
http://access.xps350.com

  #3  
Old May 11th, 2010, 11:14 PM posted to microsoft.public.access.queries
PieterLinden via AccessMonster.com
external usenet poster
 
Posts: 307
Default Daily Make Table Query

JD wrote:
I have a Make Table Query that I will need to run every morning. Is there
anyway to have the query add today's date to the name of the table (without
going in and changing it everyday) so that the new table won't overwrite
yesterday's table?


Just wondering, but is there a reason you can't just keep all the data in the
same table and index it so you can filter it easily? Whenever I see someone
asking about chunking data into lots of tables with the same structure, it
makes me leery...

--
Message posted via http://www.accessmonster.com

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:23 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.