Results 1 to 6 of 6
  1. #1
    Josh330 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2023
    Posts
    12

    How to populate table with data from another table?

    Hi everyone. I have been spending hours trying to find the answer to this but I just cannot. Here's the situation:



    I have a table let's call Clients. In that table I have a numeric field called Investment. I want to be able to inflate the Investment by a certain percentage determined by the user - let's call this field PercentIncrease. I want to set it up so that the user only needs to input the PercentIncrease once on a form, not for each record. Then there would be a PercentIncrease field in the Clients table which would update all records based on the user's input on the form. I have set up a separate table called Percent (which would only have one record based on the user's input on the form). Then I have tried to form a relationship between the tables, but the Clients table does not automatically populate.

    Thanks!

    Josh

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Would need to run VBA procedure to automate modifying data in table. Changing data is risky. Since the original value is replaced there is no audit trail to substantiate the change. Would be possible to accidentally repeat the adjustment and distort data.
    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
    Josh330 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2023
    Posts
    12
    The original value is not important in this instance. Is there another solution? I don't necessarily need the PercentageIncrease field in the Clients table. I just need the ability to have a field (maybe in a query which I can use for a report) which stores PercentageIncrease x Investment for each record.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Sure. Save value in a table. Join tables in query. Calculate.

    Same percentage applied to all clients? Then don't even have to save to table. Query or textbox can reference textbox on form to pull percentage value and calculate. Or form sets value of a TempVar variable (that would require code) and query or textbox refers to TempVar for input of percentage value into calculation.
    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
    Josh330 is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2023
    Posts
    12
    No. There are actually two (maybe to be more) PercentageIncreases fields. Only one is applied to a client depending on the client information. What do you suggest is the best way? Thanks!

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Input to table. Client table or elsewhere.

    Automation requires code. The more 'user-friendly', the more code.
    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.

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

Similar Threads

  1. Replies: 7
    Last Post: 06-11-2020, 05:27 PM
  2. Replies: 29
    Last Post: 05-02-2017, 04:38 PM
  3. Replies: 3
    Last Post: 10-09-2011, 08:55 AM
  4. populate table w/ external data
    By tlittell in forum Programming
    Replies: 2
    Last Post: 02-20-2010, 08:29 AM
  5. form data will not populate in table
    By bobsakamato in forum Access
    Replies: 1
    Last Post: 09-06-2009, 07:25 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