Results 1 to 4 of 4
  1. #1
    akapag22 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    20

    common function to save various table data into history tables

    Hi friends,

    I have two tables called t_customers, t_Items. Users can update them . Hence i I want to push the current record to a history table called th_customer and th_items respectively.
    The th_ tables has all fields similar to the t_ tables except for a new field UpdateDone Field.

    So is there a way i can use a common function where in I can pass the tablename and the curent date for the updateDone field .



    The reason for this question is that i have 5 tables which have the history tables. I want to avoid writing 5 insert statements if they can be avoided.

    Thank You

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,543
    What is the need to move to a different table
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    akapag22 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    20
    To keep track of what has been changed and at what date. SO before the update to a particular record, it is first saved to the history table.

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,543
    So is there a way i can use a common function where in I can pass the tablename and the curent date for the updateDone field .
    It should be possible to create a function which takes the date and the appropriate table name as arguments which can then be used in an input query statement to create the new record.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 09-03-2014, 05:39 AM
  2. Replies: 5
    Last Post: 03-31-2014, 02:26 PM
  3. Replies: 1
    Last Post: 07-20-2013, 01:06 PM
  4. Query Two tables based on common value
    By mhankins in forum Queries
    Replies: 1
    Last Post: 03-12-2013, 09:57 AM
  5. Replies: 1
    Last Post: 11-12-2012, 02:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums