Results 1 to 8 of 8
  1. #1
    cbramsey is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2017
    Posts
    40

    Using Queries and Forms to move data from one table to another

    Here is what I have:

    Issued Checks Table (this table contains all checks that have been issued but not cashed)
    Check Number


    Check Date
    Owner Number
    Check Amount

    Void Checks (This table contains all checks which need to be voided)
    Check Number
    Check Date
    Owner Number
    Check Amount

    Currently we are manually entering data into the void checks table through a form

    What I would like to do is be able to enter the check number in the Check Voids Form and have it populate the rest of the data for the check from the Issued Checks table into the Void Checks table. I know this has got to be fairly easy to accomplish but my brain is fried right now.

    Thanks in advance for any help

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Don't 'move' records, just change the value of a field and apply filter criteria. Field could be a yes/no type named IsVoid or maybe better a date type DateVoid. Yes, the field will be false (or null) for most records but this is simplest and most efficient approach.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    cbramsey is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2017
    Posts
    40
    We have to move them to the other table because it triggers work flow for the different departments that have to process data.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    How does 'moving' trigger work flow? Changing value in field can be a trigger. I would NOT do what you describe.

    But if you really must, example syntax for one approach:
    CurrentDb.Execute "INSERT INTO VoidTable(field1, field2, field3) SELECT fiield1, field2, field3 FROM tablename WHERE ID=" & Me.ID

    Select a check record from an UNBOUND combobox list and run code in its AfterUpdate event.

    Then to remove record:

    CurrentDb.Execute "DELETE FROM tablename WHERE ID=" & Me.ID
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    cbramsey is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2017
    Posts
    40
    In the void request table, our treasury department, revenue department, bank representative and owner relations group all have to enter data to verify procedures have been followed for the void. The issued checks table is linked to our sql database and we can't update that table per audit procedures.

  6. #6
    cbramsey is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2017
    Posts
    40
    I guess "moving" data is not the right term, more along the lines of copying, we are not editing the Issued Checks table

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    The issued checks table is a linked SQL table you cannot modify nor edit the record? Okay, I guess that is reasonable justification. Then ignore the DELETE action.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    I tend to agree with June re approach. In addition I would not use names with embedded spaces --these will lead to syntax errors at some point.

    Seems the only thing different in IssuedChecks vs VoidChecks is the name of the table.
    One table with a status field may be more appropriate. Is there any other Status that might be applied to a check?

    What makes fields unique in each of these tables?

    Can you tell us a little more about your workflow and related "triggers"?

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

Similar Threads

  1. Replies: 4
    Last Post: 01-21-2015, 09:34 AM
  2. data columns (fields) in table will not move
    By wolfm in forum Database Design
    Replies: 6
    Last Post: 05-15-2014, 10:01 AM
  3. Code to move data from table to another
    By zachlunch in forum Programming
    Replies: 1
    Last Post: 08-30-2013, 12:12 PM
  4. Move query data to a new table using VBA
    By Bob Blooms in forum Programming
    Replies: 1
    Last Post: 09-23-2012, 08:33 PM
  5. Move data from one table to another
    By rebyrd in forum Queries
    Replies: 2
    Last Post: 12-24-2009, 12: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