Results 1 to 6 of 6

Thread: Access - Use a single table for history and data backup

  1. #1
    Join Date
    Dec 2009
    Posts
    263

    Access - Use a single table for history and data backup

    Hello,
    I have a table T1 with fields C1 and C2. In the form F1 is stored in table T1.
    When I open the form F1, I see everything that is stored in table T1. So far, no problem. But the problem is as follows:
    I want when I change a field to my form, it is necessary that the line be changed in the table T1 without overwriting the old value of the field. Gender, if I have my form in F1 in the fields C1 "foo" and that if I change "foo" in "bar", I want "bar" does not overwrite foo that is stored in my table T1. I am not entitled to a second table. It forces me to do it on a table T1 that will keep the historical data. Have can I make changes to a form on a table without overwriting the old values? Thank you in advance for your suggestions.

  2. #2
    Join Date
    May 2008
    Posts
    4,570

    Re: Access - Use a single table for history and data backup

    Hi,
    You need a timestamp field that keeps the date time a form in display and a copy of the field in edit mode an edit button which will add your fields and edited now () to your table. Obviously all access to write / delete on your table become prohibited out the form and other forms to create (including new registration)

  3. #3
    Join Date
    Dec 2009
    Posts
    263

    Re: Access - Use a single table for history and data backup

    Hello,
    Thank you for your reply. My faith, it exceeds my level. I am unable to do so. Does anyone have a code to save form data in a table? I am sorry what my programming knowledge is little low, truly speaking equal to zero. So, if any one has an read made code for this please post it. It will help me.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,139

    Re: Access - Use a single table for history and data backup

    Hello,
    You can use the properties oldValue and Values to make a new entry in your table through either a RecordSet or INSERT INTO. But according to know which record was changed by the new record, not only must the field by random timestamp is another field that identifies the original registration.

  5. #5
    Join Date
    May 2008
    Posts
    3,316

    Re: Access - Use a single table for history and data backup

    Hi
    I had to manage changes from tables to form then I can help. For your problem, if I understand correctly, you will not alter the table T1 but inform one another. So in your form you must not work from the fields of T1, but from copies. You create text boxes as there are in the table T1. Fields of T1 are not visible. So if you put stuff in your fields z, your table T1 does not move, since they are hidden, you risk nothing.

  6. #6
    Join Date
    May 2008
    Posts
    4,345

    Re: Access - Use a single table for history and data backup

    Hello,
    The above post is perfect and will suit your needs. I would like to add to it, the closure of your form you create VBA code that checks whether there has been change and if so, do an insert in your backup table from fields z in your form. I hope this helps you. If you have any problem or queries on this topic the do post back and we will try to solve your problem.

Similar Threads

  1. How to merge columns of Pivot Table in single Row Heading
    By KSHaUNiSHa in forum MS Office Support
    Replies: 3
    Last Post: 27-01-2012, 07:04 PM
  2. Replies: 6
    Last Post: 27-05-2011, 10:20 AM
  3. Replies: 4
    Last Post: 30-11-2010, 03:01 AM
  4. How to copy one table data into another table directly?
    By ComPaCt in forum Software Development
    Replies: 3
    Last Post: 22-09-2009, 03:54 PM
  5. clear all windows history files with a single click
    By ChrisUlrich in forum Tips & Tweaks
    Replies: 1
    Last Post: 29-12-2008, 06:52 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,058,111.59190 seconds with 16 queries