Results 1 to 10 of 10
  1. #1
    jalewis999 is offline Novice
    Windows 10 Office 365
    Join Date
    Oct 2020
    Posts
    14

    can an update query generate an append query

    The first part is simple. Members have two types of bank account. So I need to search the member records for certain parameters, move some of the balance from one account to the other. This is a simple update query. Is it possible to create a transaction record using some of that records data on the one pass. There might be thousands of transactions. My only other choice seems to be, find a record, update, then append the transaction table.


    Thank you for any help.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,522
    Run 2 queries. Macro, or vb.

  3. #3
    jalewis999 is offline Novice
    Windows 10 Office 365
    Join Date
    Oct 2020
    Posts
    14
    Quote Originally Posted by ranman256 View Post
    Run 2 queries. Macro, or vb.
    But i will need info from each record updated.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,778
    See if what's referred to as an Upsert query will do the trick. It depends on your tables and records whether or not you can use it.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    jalewis999 is offline Novice
    Windows 10 Office 365
    Join Date
    Oct 2020
    Posts
    14
    Quote Originally Posted by Micron View Post
    See if what's referred to as an Upsert query will do the trick. It depends on your tables and records whether or not you can use it.
    It seems like it is an either or on the same table. I need to add a row into another table (Transactions) as each qualifying member record is found.

  6. #6
    accesstos's Avatar
    accesstos is offline Expert
    Windows XP Access 2007
    Join Date
    Dec 2018
    Location
    Greece
    Posts
    551

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,973
    Quote Originally Posted by Micron View Post
    See if what's referred to as an Upsert query will do the trick. It depends on your tables and records whether or not you can use it.
    AKA Upend query. For more details, see http://www.mendipdatasystems.co.uk/u...ery/4594428616
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  8. #8
    jalewis999 is offline Novice
    Windows 10 Office 365
    Join Date
    Oct 2020
    Posts
    14
    Quote Originally Posted by accesstos View Post
    Good to know but not what I need. I'm doing an update query anyway. I'm looking for a method of inserting into the transaction table immediately after the update. Update member insert a new transaction. All in one query or sql statement.

  9. #9
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,973
    Quote Originally Posted by jalewis999 View Post
    Good to know but not what I need. I'm doing an update query anyway. I'm looking for a method of inserting into the transaction table immediately after the update. Update member insert a new transaction. All in one query or sql statement.
    That is what the upend/upsert query does. Did you look at my link?
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  10. #10
    RandyH is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Dec 2020
    Posts
    25
    I'm not a programmer, but I've done a lot of programming on my system.

    When I needed what you are describing I did this because it was all I knew.



    My Update Command Button

    On Click

    .Execute "Update Qry",
    .Execute "Append Qry",




    Didn't use any db Error code Because I didn't want to click through the standard warnings.


    Of course there is more code the end this!

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

Similar Threads

  1. Update or Append Query
    By blue_echo in forum Queries
    Replies: 4
    Last Post: 08-03-2016, 09:39 PM
  2. Replies: 6
    Last Post: 12-03-2014, 10:28 PM
  3. Update/Append Query
    By joannakf in forum Queries
    Replies: 5
    Last Post: 05-21-2012, 04:02 PM
  4. Replies: 3
    Last Post: 03-11-2012, 03:35 PM
  5. Append/Update Query -- Need Help!
    By su-san in forum Queries
    Replies: 12
    Last Post: 11-08-2010, 12:52 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