Solved

VBA to run query make table query to create new unique table with date stamp

Posted on 2015-02-02
5
58 Views
Last Modified: 2016-02-11
Hi,
I see how I can use VBA to execute a query.
http://www.experts-exchange.com/Database/MS_Access/Q_28260015.html
and what I need is to be able to execute the query (make table) and at the same time dictate the name of the table as I'd like to change the table each month AND KEEP the previous months table.

I'm doing sort of a modified backup of some tables each month and would rather not have the data appended into a table, the use of the tables is more easily managed if they are separated by month.

Thanks,
0
Comment
Question by:ghettocounselor
  • 2
5 Comments
 
LVL 37

Expert Comment

by:Neil Russell
ID: 40584516
Would it not make far more sense to have just one table but with an extra field in it called MONTH and you populate this with your month identifier?  This separates them by month and makes your life a lot simpler.
0
 

Author Comment

by:ghettocounselor
ID: 40584775
Hi Neilsr, To you and I yes it would. To the end user of the tables that means one more thing they've got to manage in their minds hence the request that they have a table for each month. Basically the end user wants to be able to look at a month (around 5k rows) more like an XLS rather than have to query the table for a given month. I'm slowly working on migrating the users to a more thorough understanding (and use) of MS Access, 1st step is to get them to open the product, even getting there was a challenge. Sorry for long winded reply.
0
 

Accepted Solution

by:
ghettocounselor earned 0 total points
ID: 40621161
Note to self here. After pondering this a bit I think I will look into just using an append table process for the backup. It does make the process of later querying the table a bit more cumbersome for users that want to (in this use case) review history but given the lack of interest here in solving the problem apparently staying out of VB is the easiest way to go.
0
 
LVL 45

Expert Comment

by:Martin Liss
ID: 40684214
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now