Archiving Basics ???
Jul 6, 2005
Hi Guys,
Im about to create a button on a form that will archive the current record to an archive table.....
The question is, Before I start to look into this, I would just like to clarify what I do.
I assume firstly I would need to make an exact copy of my current table, them remove all data, then change name to something like "tbl_archive_data"
( this would be to hold the archive info right ? )
Once I have done this, I`m assuming i`ll have to make some sort of query that will copy the data to the new table, then delete the record from my current table ?
Then I`ll have to create a button on my form, which can be cliocked on by the user to archive this particualr record...
In a nutshell, would this be sort of the correct way to do this ???
Any recommendations/advice will be much appreciated on this.
I know there is already some archive details in the forum, but none of them really made much sence, as they were answers to problems with this already half done....
Thanks in advance guys.
Max
View Replies
ADVERTISEMENT
Jul 6, 2006
I have a little experience with Access. But thats only really the basics.
Basically my database is very simple. It holds data about customers, names, addresses, etc. Along with a review date. Plus it holds information regarding the location (in a filing system) of important papers for that customer. Basically the system is used to find out where the customers papers are located. As well as a query that can be ran on any review date, and the address taken from those records (that match) and shoved into word in a list.
My problems are these,
1) If a query returns back with no results. How can I make it so that a message box appears explaining so?
2) When editing a record in form view. Is there anyway of creating a 'cancel' button that will undo any changes that have been made to the record? It seems that as soon as you close the box it doesnt ask if you want to save the changes?
3) How do I create a delete button so that I can delete a record?
4) And lastly, what would be the best method of going about getting the address's out of records via their review date as mentioned above? I have a query that will allow you to enter in the review date you are looking for, but after that I am lost lol.
I know these might sound like very pathetic questions to ask lol, reading the forums you all seem so knowledgable on these things so I really hope you can help a newbie lol.
Thanks in advance.
View 5 Replies
View Related
Feb 25, 2005
I am pretty new to Access and I have a lot of questions. The first, and probably most basic is this:
I have created a combobox with multiple names. I would like to be able to have the user select multiple names to enter into the form. I have created a background table with the list of names and that is where the combobox pulls the names from. When I go to the "Forms view", the combo box will not allow me to select multiple names and it only displays the first column of the table. What do I need to do to be have the user be able to select multiple names and to have more than just the first column visible? Thanks
View 1 Replies
View Related
Jul 4, 2006
I have no idea what i am doing... However I do concede that I am a hyper-intellect and I pick things up extremely fast.
I was assigned at work to create a MS Access Database. Usually these are very involved and costly as it requires someone with knowledge of the program and the business alike to be able to create one. I have all the necessary field headings and I know and understand the construction of database forms (layout, formatting etc.). My problem lies herein: I do not know how to make the data record into a table or set of forms, I dont know how to use macros or VBA, i am rusty at creating tables and queries anddddd.... not going to lie, the whole Access thing is not working out for me.
If ANYONE can help me, then please please please do so. I need to know only basic things im sure. I need to be able to create a table from my form (that was my groundwork) and I also want to know why i can't add records to my database...
again...i don't know any VBA so take it easy with the answers.
Boberto
View 6 Replies
View Related
Jul 20, 2005
I have an application which creates 200 rows a day. As you can imagine the tables get big very quickly. Is there a mechansim that I can use to archive off the tables to a new seperate database rather than to a table in the same database. I would like to perfom this by allowing the user to click on a button and perform the archiving automatically.
my users are non technical and requesting them to perform any tasks behind the scenes would not be an option.
Anyone any experience of doing this ?
Thanx in Advanz.
Niall.
View 1 Replies
View Related
Oct 3, 2006
Hi guys
I need some help working out a way to archive records. All i really want is a button on a form that when clicked deletes the record currently displayed on the form from its table and moves it to another table that i will call 'archives'.
I think it might have something to do with using an append query but i cannot think how to do it.
Thanks in advance.
James
View 3 Replies
View Related
Sep 28, 2007
I have no idea how to even begin an archive. Can anyone give some direction? I've spent two days searching the web and trying to understand the Microsoft website directions along with Access for dummies. The only thing I can find is something about using Products_Appends and Products_Delete queries.
View 12 Replies
View Related
Jul 24, 2006
Hi to everyone. I was assigned to collect all data regarding the electronic equipment of the firm that I work for and I just need a push to start with :D
My thought is to create 3 tables (one containing the users, another one containing info about the equipment and a third one to be something like an archive or a log...e.g. this monitor is now currently being used by me but in the past somebody else had it).
I am not quite sure how to do this (the archiving I mean...) Any help is welcome
Thanks...
Kyriakos
View 1 Replies
View Related
Oct 3, 2006
Hi guys
I need some help working out a way to archive records. All i really want is a button on a form that when clicked deletes the record currently displayed on the form from its table and moves it to another table that i will call 'archives'.
I think it might have something to do with using an append query but i cannot think how to do it.
Thanks in advance.
James
View 2 Replies
View Related
Nov 29, 2005
i created an audit trail in my DB... i do need to submit reports reflecting the relevant changes made.... however, i notice that the report can be very lengthy if not renewed every month.... can i archive these trails.. on a mthly basis? if yes.. how ? if not... is there anything else i can do?
View 1 Replies
View Related
Jul 24, 2006
Hi all,
currently on my db it stores data on various projects, and these projects are sorted by a status of on hold, on going, or finished. What im trying do is move only the projects that are finished but still keeping a record of them so we can view them in the future.
i was thinking maybe i could move the finished projects into another db? but not sure how to do, or is there a better way to achieve this?
thank you
View 2 Replies
View Related
Nov 24, 2006
I have a database for tracking tasks. each task may have associated documents for it which are kept in a separate table.
I have an archiving procedure which takes closed or completed tasks (from the main table) and appends them to an archive table but it leaves the associated documents in the second table, or if I enforce integrity it will delete them.
Anyone have a suggestion on how i can archive records from two tables at the same time I include the archive code for your information....
Many Thanks as always for your help and assistance
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''
' procedure archives closed or complete records to archive table and then '
' Deletes original records from source table '
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''
On Error GoTo Err_btnArchiveAdhoc_Click
Dim strMySql As String, strResponse As String, intRecordCount As Integer
Dim cnn As ADODB.Connection
Dim rstTemp As ADODB.Recordset
strResponse = MsgBox("By clicking Yes you will Archive any closed or" & _
vbCrLf & "completed tasks and delete the original records from the table", vbExclamation + vbYesNo, gstrAppTitle)
If strResponse = vbNo Then
Exit Sub
Else
Set cnn = CurrentProject.Connection
Set rstTemp = New ADODB.Recordset
' builds sql string to append closed or complete records from the original table into archive table
strMySql = "INSERT INTO tblArchiveAdHocTasks ( Seq_Number, Item_Type, TaskTitle, Task_Description, TaskActions, StartDate, TgtDate, ReviewDate, TaskLead, Status, LastUpdatedBy, estHours, Progress, PersIDAssocPerson1, PersIDAssocPerson2, PersIDAssocPerson3, PersIDAssocPerson4, PersIDAssocPerson5 )"
strMySql = strMySql + " SELECT tblAdHocTask.Seq_Number, tblAdHocTask.Item_Type, tblAdHocTask.TaskTitle, tblAdHocTask.Task_Description, tblAdHocTask.TaskActions, tblAdHocTask.StartDate, tblAdHocTask.TgtDate, tblAdHocTask.ReviewDate, tblAdHocTask.TaskLead, tblAdHocTask.Status, tblAdHocTask.LastUpdatedBy, tblAdHocTask.estHours, tblAdHocTask.Progress, tblAdHocTask.PersIDAssocPerson1, tblAdHocTask.PersIDAssocPerson2, tblAdHocTask.PersIDAssocPerson3, tblAdHocTask.PersIDAssocPerson4, tblAdHocTask.PersIDAssocPerson5"
strMySql = strMySql + " FROM tblAdHocTask "
strMySql = strMySql + " WHERE (((tblAdHocTask.Status)=6 Or (tblAdHocTask.Status)=10))" ' status 6 is closed and 10 is complete
DoCmd.SetWarnings False
'DoCmd.RunSQL strMySql ' runs append query
rstTemp.CursorLocation = adUseClient
rstTemp.Open strMySql, cnn, adOpenDynamic, adLockOptimistic
DoCmd.SetWarnings True ' turn warnings back on
' deletes records that have been archived above
strMySql = "DELETE tblAdHocTask.Seq_Number, tblAdHocTask.Item_Type, tblAdHocTask.TaskTitle, tblAdHocTask.Task_Description, tblAdHocTask.TaskActions, tblAdHocTask.StartDate, tblAdHocTask.TgtDate, tblAdHocTask.ReviewDate, tblAdHocTask.TaskLead, tblAdHocTask.Status, tblAdHocTask.LastUpdatedBy, tblAdHocTask.estHours, tblAdHocTask.Progress, tblAdHocTask.PersIDAssocPerson1, tblAdHocTask.PersIDAssocPerson2, tblAdHocTask.PersIDAssocPerson3, tblAdHocTask.PersIDAssocPerson4, tblAdHocTask.PersIDAssocPerson5"
strMySql = strMySql + " FROM tblAdHocTask"
strMySql = strMySql + " WHERE (((tblAdHocTask.Status) = 6 Or (tblAdHocTask.Status) = 10))" ' status 6 is closed status 10 is complete
rstTemp.CursorLocation = adUseClient
rstTemp.Open strMySql, cnn, adOpenDynamic, adLockOptimistic
End If
MsgBox "Export Complete ", vbInformation, gstrAppTitle
Exit_btnArchiveAdhoc_Click:
Exit Sub
Err_btnArchiveAdhoc_Click:
If Err.Number = 2501 Then ' runtime error as user cancelled delete part of query
Exit Sub
End If
MsgBox "'Error" & Err.Number & "'" & vbCrLf & Err.Description
Resume Exit_btnArchiveAdhoc_Click
End Sub
View 6 Replies
View Related
Dec 11, 2007
I'm not even sure which forum to put this in, as it involves a form, two tables, some queries, and possibly a macro. I've poked around the message boards here and haven't quite found a method that works for my situation. So here we go!
I have a recruiting database that I've developed for some other users in the office who are not Access builders. They have asked if there is a way to archive old records into another table for safekeeping, which I can do through the database window, but which they probably couldn't. I want to give them the ability to tuck these records away as needed, and without them having to ask me to do so every time.
The main table in the DB is called tblPosition. There is a form called frmPositionManagement which is bound to this table. It's through this form that the recruiters make all their updates and whatnot to records stored in tblPosition. I also have a table called tblArchive which I have created using the exact same fields as tblPosition so I can store the outdated records there.
I'm looking for a programmatic way to do this. I was hoping to put a button on frmPositionManagement that would let the user remove that record from tblPosition and send it to tblArchive. I had figured on creating a macro (mcoArchive) that took the following steps:
* MsgBox "Are you certain you want to archive this record?"
* Run an Append Query to add the selected record to tblArchive
* Run a Delete Query to remove the record from tblPosition
* Close the Append Query
* Close the Delete Query
Then I started building those two queries and the macro, and the wheels fell off my brain.
The difficulty I'm having is getting the system to say to itself, "The record currently displayed on the frmPositionManagement is the one I need to append and delete." I have a specific record selected on the form, so how do I pass that record's unique ID through to the two queries to make this record the one which is appended/deleted?
I had tried setting the criteria for the unique key in the Append/Delete queries to =[frmPositionManagement]![AutoID], but that just led to a pop-up box that asked me to input frmPositionManagement!AutoID, which is not what I wanted at all.
My VB isn't all that great, so I was trying to stick to macros, but if someone has an idea for a programmatic solution for this conundrum, I'd appreciate hearing it!
Thanks,
Andreas
View 4 Replies
View Related
Jun 27, 2005
Hi, I have a form which is made up for 3 tables and I am trying to create an append query for each one in order to keep records of data before it is updated. The append queries seem to work but they append all data rather than just one selected record. I know I will next need to create a macro which can be used each time a record has been updated and a copy is sent to the archive. Can anyone help me with this, or have any useful suggestions?
Thanks.
View 2 Replies
View Related
Jun 24, 2013
I have a database with employees. The tables are as follows:
Deptdatatble
Depttble
Emptble
HRtble
Servicetble
Servicedatatble
Archivetble
Classestble
Classdatatble
At certain times, I want to archive employees out (lets say they are terminated). When I do this, something strange happens. If an employee has 4 records in the servicedata table and 4 records in the Classdata table, then it exports out 16 records (4 x 4). I would expect it to export out 8 records.
View 6 Replies
View Related
Jul 26, 2013
I'm trying to create an archiving routine as my database is becoming very large. For about 10 tables I want to shift certain records to an external database which would have the required 10 tables with the same table names and structure.
So far so good. I now want to automate everything using vba. I can see how to use the INSERT INTO statement but I don't want to have to name every field as there are hundreds. I just can't see how to do this.
If the table structures are identical how do I neatly shift a bunch of records from one to the other using code.
View 1 Replies
View Related
Dec 4, 2012
I'm trying to create an archiving system, where i use a simple Append Query followed by a Delete Query.
A typical criteria for the Append Query is less than Date()-30...so any records older than 30 days can be appended to an archive table. This works fine when i enter it in the Query Design criteria row.
But, I would like to make this user-defined. I have set up an unbound form as shown in the first attachment...and made a global variable entitled 'ArchiveDays'. I am hoping to use the variable to act as the criteria for the append criteria. (Please note that in the screendump...they can select an option button if they just want to stick to 1 month old. I also show you my assignment operations there).
My question is... how do i get the variable 'ArchiveDays' value to be the criteria for my append query....
View 14 Replies
View Related
Apr 30, 2015
Will archiving older data improve response time of a database?
What is the best way to archive data knowing that older records will still be accessed twice a year?
View 2 Replies
View Related
Jul 23, 2012
How do i archive Ms Access 2007 table records with specific date?
Any easy way to do it without writing any macros?
View 2 Replies
View Related