Results 1 to 5 of 5
  1. #1
    sovietbiker is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Nov 2015
    Posts
    2

    Auto populate fields after inserting a records in column 1

    Using Access 2013 app. I have two tables. Table one has all of my product information.


    1. Product id
    2. Product Name
    3. Product Location

    In Table two I have a lookup column for Product id. I want to auto fill product name and product location into columns. The reason I am bringing them both into table two is that the users will be expanding on the data entry and adding more information to the records.

    How do I auto populate fields based on an ID from another table.

    Thanks!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    sovietbiker is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Nov 2015
    Posts
    2
    No, this doesn't really work for me using an access app.

    I almost have it using a SetProperty after update. Unfortunately, I can't get to return a value from a table. It just returns yes or no. Any suggestion on how to get the Set Property macro to return a value from a table.

    Thanks

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Well, if you're using a form and a combo you'd include the fields in the combo row source. If you don't like the code I posted, a macro can do the same thing.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    emihir0 is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    22
    Why would you need to have all 3 columns in your second table?

    That seems like a design flaw.

    However, what you are trying to achieve (from what I understood) can be easily done using a query - something along the lines:

    Code:
    SELECT t1.a1, t1.a2... t2.a1, t2.a2...
    FROM t1 INNER JOIN t2 ON t1.somePK = t2.someFK;

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

Similar Threads

  1. Auto-populate fields in appended records
    By FinChase in forum Access
    Replies: 2
    Last Post: 06-17-2014, 10:23 AM
  2. Replies: 3
    Last Post: 05-03-2014, 11:00 AM
  3. How do I auto populate several fields at once
    By learmanj in forum Programming
    Replies: 4
    Last Post: 07-20-2013, 11:41 AM
  4. Auto Populate two fields
    By funkygoorilla in forum Access
    Replies: 7
    Last Post: 08-31-2011, 09:06 PM
  5. Replies: 12
    Last Post: 08-30-2011, 03:36 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