473,503 Members | 1,849 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Auto-switch to archive data table when historical data is required

547 Contributor
How would i approach this scenario - my main data table (tblAcquire) is getting to big and is draining the system resources, when i do queries.
1.I have a dedicated form with a combobox (frmReports) listing the reports i have available.
2.The data is extracted based on a "StartDate" and "EndDate" textboxes.
3. Is there a way i can tell Access that if data does not appear by date in the "tblAcquire" table, then it must prompt me to temporarily switch the report to "tblAcquireArchive", to access historical data. The "startdate and "Enddate" would be for specific financial periods only, and will not overlap between the current and archived data.

My plan is to display the last date appearing in the archive table, on this form.

I imagine that the row source of the report needs to be automatically changed based on the data i require?

Any suggestions please?
Aug 9 '14 #1
4 1229
Seth Schrock
2,965 Recognized Expert Specialist
This might not be the best way to do it, but I would have a table that stores newest date in the archive table. For example if you have archived everything older than 12/31/2012, then I would have that date in this new table. This makes it possible to compare the search dates to the archive date and know which table to pull from. Then in the report's On_Open event, change the record source depending on if your dates are before or after the archive date.
Aug 9 '14 #2
neelsfer
547 Contributor
thx Seth. I realized now this is quite a job. For the time being, i am going to use an append query and delete query to move old data to an archive table, based on start and end date textboxes. I also added a restore button, to append data back to the main table, when required to do old reports. With time i can start to modify the many reports i have then.
Aug 9 '14 #3
NeoPa
32,557 Recognized Expert Moderator MVP
Neels. You still need to catch up with Database Normalisation and Table Structures.

You should not be considering archiving the data to separate tables and complicating all of your existing db functionality. Instead you need to think about creating a simple flag that indicates which items should be considered as archived, with all the data sitting in the same table.

If you must archive stuff which is no longer required (and I do in some cases) then do so, but not until it is no longer required in any of your reports.
Aug 10 '14 #4
twinnyfo
3,653 Recognized Expert Moderator Specialist
Neels,

I am with NeoPa on this one. I have code that automatically archives my data, but that data is only saved for historical (and archive) purposes. If I need to access the data, I can, but it cuts my table size (which is accessed constantly) by about 80% right now (that percentage grows over time).

The solution would definitely not be to append and delete your data, as this could quickly produce back end bloating.
Aug 12 '14 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1665
by: Renie83 | last post by:
Hi all, I was wondering if anyone has any ideas on how I would go about this task. What I have is a html table which is populated from 2 different sql tables. The first table contains values of...
1
3122
by: rottytooth | last post by:
A general data design question: We have data which changes every week. We had considered seperating historical records and current records into two different tables with the same columns, but...
3
3771
by: Erwin | last post by:
I have a work assignment in which I have to put a historical archive within access which can be used for trendlines etc. It contains data about month, service percentages and numbers. Within a...
2
1917
by: Trillium | last post by:
I have an application with a list of questions, which are associated with answers by a questId in a one-to-one relationship. The questions may come from an XML file or a SQL Server database. The...
1
2764
by: John | last post by:
Hi When using Table Adapter Configuration Wizard if 'Use SQL Statements' is selected as Command Type, the data table's name in dataset is retained and only its data adapter's select statements...
1
2269
by: sbowman | last post by:
I'm in the process of creating a monthly reporting database. I've worked out all the queries which are all counts of particular field values. I need to store these values in a table for historical...
0
856
by: m105es | last post by:
I want to create Data Table and each row can contains different web control like calendar,text box,etc. The web controls depend on the parameter. Anyone can help me?
1
4956
by: cathycros | last post by:
Hi, I'm trying to take data from varchar fields in one table and copy it to Nvarchar fields in another table. (Long story - now dealing with multiple languages, not enough space in row in current...
3
2401
by: mukeshrasm | last post by:
Hi I have to write data from excel to data table on my server and ms office is not installed on the server. I am able to save the excel file but I don't how I can write it to data table from excel...
3
3411
by: cheweedog | last post by:
I have a form that contains 1 subform. Everything works fine until I tab into a textbox in the bottom of the main form. The data in the subform disappears on the form, but the table is updated. ...
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5021
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3166
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1519
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
397
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.