Results 1 to 3 of 3
  1. #1
    Access_Novice is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Posts
    265

    Editing query results, then appending to a table

    I don't have a sample I can upload. This is something I am just thinking about doing. I am try to create a billing record from timesheet data. I want to have a table to store timesheet information (tblTimesheets) and another table to store timesheet information that has been "posted" as being billed. This other table is called the tblBilled. The timesheet data would be uploaded every two weeks. Each time it is uploaded, the previously existing timesheet data would be deleted and replaced by the more recent year to date data (to take into account corrections to previous timesheets).



    I would then initiate a query between tblTimesheet and tblBilled with a LEFT OUTER join. The result would be timesheet data from tblTimesheets that does not appear in tblBilled, meaning timesheet data that has not been billed yet. I might have to make some adjustments to the hours and $ in the query result as needed. When I'm done, I want to "post" this timesheet information so it is now recognized as having been billed. To do this, all I want to do is take those query results and append them to the table called tblBilled.

    Is this possible? I'm sure I can take the query with the LEFT OUTER join and turn that into an append query, but the problem is that first I have to view the queried results and modify them. So I can't append them right away. So after I modify the queried results (e.g. decreasing the hours and cost), from this point, can I somehow append those modified query results to tblBilled?

    Please keep in mind, that the timesheet data is uploaded every two weeks so it is constantly changing. Not only that, before each upload, the previously existing data needs to be deleted. So the data in tblTimesheets will change as new timesheet data is collected. Not only that, but timesheet entries from previous months could change due to timesheet corrections.

    The data in tblBilled will also change as new timesheet data gets billed, however prior billed data will always remain the same.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Erasing previous timesheets then loading them all over again sounds like a terrible idea. This is where youd have codes to show they were billed.

    Instead, I would never delete the timesheet table, but rather, import all timesheets to a 'temp' area, compare the imported ones to the existing, remove sheets that have no change.
    Now the temp table has 'modified' time, and new. Update timesheets and billing accordingly.

  3. #3
    Access_Novice is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Posts
    265
    Quote Originally Posted by ranman256 View Post
    Erasing previous timesheets then loading them all over again sounds like a terrible idea. This is where youd have codes to show they were billed.

    Instead, I would never delete the timesheet table, but rather, import all timesheets to a 'temp' area, compare the imported ones to the existing, remove sheets that have no change.
    Now the temp table has 'modified' time, and new. Update timesheets and billing accordingly.
    The reason for deleting the timesheet table is because I can requery the data at anytime then upload it. Not only that, timesheet corrections occur every so often anyway so that is another reason. The timesheet source would come from another system so if I upload it to Access, do the necessary comparisons to what was previously billed there is no harm in deleting it because next time, I would start with a fresh query of timesheet data anyway.

    So if I do the comparison, modify any numbers as necessary, could I still append that to the Billing table?

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

Similar Threads

  1. Replies: 6
    Last Post: 05-19-2015, 09:34 AM
  2. Replies: 1
    Last Post: 09-08-2014, 09:47 PM
  3. Replies: 5
    Last Post: 05-21-2013, 02:21 PM
  4. appending results to a text box
    By michaelinitaly in forum Forms
    Replies: 3
    Last Post: 09-11-2011, 11:35 AM
  5. Replies: 0
    Last Post: 10-16-2008, 02:39 PM

Tags for this Thread

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