+ Reply to Thread
Results 1 to 5 of 5

How to properly update a table?

  1. #1
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    How to properly update a table?

    Hi everyone

    I have a table that has a column of codes (1-10) that never change. Within that table I update the number of products completed for that particular code. I would like for my final results to only consist of May production, currently though, I still have Aprils numbers if there wasn't a change in May. I realize thats what an update query is so I'm asking for suggestions.

    I did try a delete query so I can clear the outdoor and indoor fields before I update but that also deletes the code field.
    Attached Files Attached Files
    Last edited by AccountingJ; 06-10-2020 at 02:31 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,570

    Re: How to properly update a table?

    I don't see the point of the after updateq table since it only ever contains data from the last month.
    Ben Van Johnson

  3. #3
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    Re: How to properly update a table?

    Yeah I agree but the table with the codes needs that information. If I were to run select Q, it would take multiple Queries which is what it seems I need to do now that I think about it.... appreciate your help/thoughts

  4. #4
    Registered User
    Join Date
    01-20-2013
    Location
    Holland
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: How to properly update a table?

    Maybe you can do something with this suggestion.

    You can use
    the switch function or
    an if then function

    in a query to solve your problem.

    In the links are a few examples.
    I was not allowed to post links please correct the links by yourself.


    ThisIsA_Url_support.microsoft.com/en-us/office/switch-function-d750c10d-0c8e-444c-9e63-f47504f9e379

    ThisIsA_Url_youtube.com/watch?v=7uVhiG6DbmY



    Good luck.

  5. #5
    Forum Contributor
    Join Date
    09-19-2016
    Location
    Alaska
    MS-Off Ver
    MS 2010, 2013, 2016
    Posts
    272

    Re: How to properly update a table?

    Thanks for the suggestion Peter.

    What I ended up doing is creating a macro to copy those tables before they get any data on them, then run my queries. Then I have another macro set-up to delete the tables with the old data and rename the copies to the originals if that makes any sense after I am done with them...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 10-18-2017, 03:24 PM
  2. Trying to update an access table from Excel based on unique ID. rst.Update not working
    By Newbie0924 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-22-2015, 04:15 PM
  3. Components are not working properly after windows update
    By fcostasilva in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-25-2012, 12:39 PM
  4. Update command not working properly.
    By KasiaFavourite in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2011, 08:10 AM
  5. Cells don't properly update
    By chuckee in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-28-2008, 05:48 AM
  6. Sumproduct wont update properly on closed workbooks
    By vane0326 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-17-2006, 10:26 AM
  7. Excel 2000 to 2003 update links doesn't work properly any suggest
    By Richard in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-07-2005, 09:05 PM

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1