Results 1 to 4 of 4
  1. #1
    Yesvice is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2020
    Location
    UK
    Posts
    10

    How to... make a button that copies certain data from form or table to the another

    Hi folks

    Doing a access project for the purpose of merging 5 excel spreadsheets and word templates into one program. One reason I am doing this is to reduce repetition as a lot of the details in these documents are going to be same.

    In this thread the issues is as follows:
    I have 4 forms which I will name for this exercise, A, B, C, D, & E, but forget form E for the moment though (lets leave it a Myster E) :P
    Each form represents a different process


    Form A is the principal process but B, C, & D are optional preliminary processes that need sometimes happen before A, but not always so it is possible data in B for instance won't end up in A.
    Though A, B, C & D hold different information to each other there are a series of say 5 or 6 fields which are the same in each form which I shall call Group 1, and likewise a series of fields from subforms I shall call Group 2.
    So the question is how do I go about making transferring or copying certain data, when needed from either forms B, C & D all the way to form A? This would need to be done in a user friendly way as many of my collegues are tech phobic.
    Now my own thoughts are that I would need to either create a button per row of data in forms B, C & D that transfers the fields to form A, or in form A I would need a button that populates certain fields and gives the option to pick from forms B, C, or D.


    Unfortunately I am not sure where to start with this one. What is the best way to deal with this issue?

    If its all doable I even have a bonus question around Form E? :O

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    make an append query(s).
    the item shown in the current form, the current record would have key : K
    use that as the source to append to target table.

    like:
    INSERT INTO table2 SELECT * FROM table1 where Key = forms!fMyForm!txtKey

    you could put them all in a table for the user to pick,
    or hardcode them depending on the form name.

  3. #3
    Yesvice is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2020
    Location
    UK
    Posts
    10
    Thanks ranman256

    Still learning as I go so I will read up on queries first and let you know what happens from my experimenting!
    I wasn't sure if queries were just a find function like an inbuilt Ctrl F... or something even more powerful, but I think you have gave me my answer

  4. #4
    Yesvice is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2020
    Location
    UK
    Posts
    10
    Ok I have read up on append queries on this website https://www.tutorialspoint.com/ms_access/index.htm and think I am getting closer to solving the problem... and more importantly learning about the system!

    First conundrum so far...
    The forms mentioned in my first post are made out of information from two tables each. The first table (lets call it A.1) contains most information while the second (A.2) is used to make a subform. A.1 and A.2 are in a One-To-Many Relatiobshup. Forms B, C, D all have the same layout e.g. Tables B.1 and B.2.

    Using form B as an example, if I want to append one row of data from B.1 to A.1 I also want to the related data from B.2 to A.2 (which may make up more than one row). How is this done and the relationship maintained?
    Firstly the main link in the relationship is the foreign key (if I'm correct), but if the data is appended to a new table then surly the key will change?
    Secondly there is the slightly more mundane issue trying to do a double append in a single action

    Any ideas on howto deal with this issue going forward?

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

Similar Threads

  1. Replies: 6
    Last Post: 02-16-2016, 09:20 PM
  2. Replies: 6
    Last Post: 12-13-2014, 09:20 PM
  3. Replies: 1
    Last Post: 11-14-2012, 02:38 PM
  4. How to make table from button on form
    By JackieEVSC in forum Forms
    Replies: 3
    Last Post: 11-04-2011, 06:44 PM
  5. Database Linked Even If I Make Copies
    By netchie in forum Access
    Replies: 4
    Last Post: 07-22-2011, 11: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