Results 1 to 2 of 2
  1. #1
    out4blood is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    1

    Help with efficient method for appending calculated records to new table

    I am developing a database where I need to perform calculations on fields in a record and then append multiple records in another table based on the caluculations. For example:



    Each record in an Estimate table:
    Code:
    est_id    start_date      num_of_weeks,     num_per_week
    1         6/4/12          4              5
    gets "processed" and appended to another table like this:

    Buy table
    Code:
    buy_id    est_id    week_date    week_num    num_per_week
    1        1    6/4/12        1        5
    2        1    6/11/12        2        5
    3        1    6/18/12        3        5
    4        1    6/25/12        4        5
    In this specific case, the "processing" is using the initial start_date and num_of_weeks to build a schedule for each week of num_per_week, along with other data. Ultimately, the items with similar week_date get aggregated together.

    My initial approach is to use DAO and loop through a procedure that appends each new record, incrementing (week_date + 7), and (week_num + 1) from 1 to num_of_weeks.

    But I wanted to be a little humble and ask for thoughts on the easiest and most efficient method to accomplish this. Any ideas?

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    My initial approach is to use DAO and loop through a procedure that appends each new record, incrementing (week_date + 7), and (week_num + 1) from 1 to num_of_weeks.
    That is exactly how I have handled things like this in the past. I think it is a good way to go.

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

Similar Threads

  1. Replies: 1
    Last Post: 03-29-2012, 06:19 PM
  2. show duplicate records when appending a table
    By bdaniel in forum Programming
    Replies: 1
    Last Post: 06-01-2011, 07:15 AM
  3. Key violation when appending records
    By slaterino in forum Programming
    Replies: 10
    Last Post: 08-26-2010, 08:25 AM
  4. Newbie needs help appending table
    By hara in forum Queries
    Replies: 6
    Last Post: 06-30-2010, 05:42 PM
  5. Appending Records to tables with relationships
    By RubberStamp in forum Import/Export Data
    Replies: 0
    Last Post: 12-14-2008, 06:52 AM

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