Results 1 to 12 of 12
  1. #1
    macloch is offline Novice
    Windows 10 Access 2003
    Join Date
    Aug 2018
    Posts
    6

    Question How to copy values in table?

    Good Morning,

    I'm a new Access user and I need help in one issue.
    I have a table called "nabytki" and I must copy values in nearly 9 000 lines (records).


    I must copy values from the selected fields from the line "A" to the line "B" like in picture.

    How can I do that?
    Attached Thumbnails Attached Thumbnails obraz_2.jpg  

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    use an append query.
    the source would be the record you want to copy,
    and append to that table.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Why duplicate so much data? Should not be so many fields dupicated in two tables.
    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.

  4. #4
    macloch is offline Novice
    Windows 10 Access 2003
    Join Date
    Aug 2018
    Posts
    6

    use an append query.
    the source would be the record you want to copy,
    and append to that table.
    Thx for your answer. I will try to check this tomorrow.

    Why duplicate so much data? Should not be so many fields dupicated in two tables.
    It's not my idea

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Okay, explore INSERT SELECT sql syntax.
    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.

  6. #6
    macloch is offline Novice
    Windows 10 Access 2003
    Join Date
    Aug 2018
    Posts
    6
    use an append query.
    the source would be the record you want to copy,
    and append to that table.

    I'm trying do that, but I must do something wrong. Can you please show what I should to do step by step?

  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
    Tutorial shows syntax for 2 tables but can be adjusted for one table https://www.w3schools.com/sql/sql_in...nto_select.asp

    Post your attempt for analysis.
    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
    macloch is offline Novice
    Windows 10 Access 2003
    Join Date
    Aug 2018
    Posts
    6
    Here you are.

    Code:
    INSERT INTO przesuniecia ( symbol_oddzialu, oznaczenie_spisu, numer_spisu, pozycja_spisu, poprzedni_symbol_oddzialu, poprzedni_oznaczenie_spisu, poprzedni_numer_spisu, poprzedni_pozycja_spisu )
    SELECT nabytki.symbol_oddzialu, nabytki.oznaczenie_spisu, nabytki.numer_spisu, nabytki.pozycja_poczatkowa, nabytki.poprz_symbol_oddzialu, nabytki.poprz_oznaczenie_spisu, nabytki.poprz_numer_spisu, nabytki.poprz_pozycja_poczatkowa
    FROM nabytki;

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    You probably need a WHERE clause in the SELECT that restricts the records to be copied.

    We really don't have enough info to provide detailed guidance.
    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.

  10. #10
    macloch is offline Novice
    Windows 10 Access 2003
    Join Date
    Aug 2018
    Posts
    6
    What kind of the information do you need? I will try to give this.

  11. #11
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    What criteria will identify the specific record(s) to copy? Did you try including WHERE clause?

    You show a table. If you want to run this action with code and dynamic parameter, use a form.
    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.

  12. #12
    macloch is offline Novice
    Windows 10 Access 2003
    Join Date
    Aug 2018
    Posts
    6
    I did that. Thank you so much for your support.

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

Similar Threads

  1. Replies: 4
    Last Post: 01-11-2018, 08:49 PM
  2. Replies: 1
    Last Post: 09-27-2013, 04:18 PM
  3. Replies: 2
    Last Post: 05-28-2013, 12:32 PM
  4. Replies: 1
    Last Post: 10-29-2012, 08:15 AM
  5. Copy values from table1 to table2
    By wubbit in forum Queries
    Replies: 2
    Last Post: 04-19-2012, 04:40 PM

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