Results 1 to 4 of 4
  1. #1
    tomneale is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Posts
    2

    Trying to create a lookup

    Hi everyone,

    I am trying to create a database for work, and something has got me completely stumped. I've watched youtube videos, googled it and I just can't get it to work. I want one field in the table to lookup that field, find it in another table, and return the associated value so I can create a calculated field in that table.



    1. so I have a table called Purchase Orders. In this table I have Purchase Order No. and then lookups from other tables e.g. Product>Blueberry, Supplier>Supplier A, Country of Origin>Argentina



    2. In Purchase orders, I have a field called "Subproduct" this is basically product format, I deal in say 10x125g Punnets, or 10kg bulk boxes.



    3. In the Subproduct table, I imported an excel where I have the subproduct name, and then it's associated weight in kg.


    4. I want it so that when I select subproduct in Purchase orders, it will lookup that subproduct in the Subproduct table, and return the Weight KG value, and put it in Weight Per Box in Purchase Orders.

  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
    Is this what you're looking for?

    http://www.baldyweb.com/Autofill.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    tomneale is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Posts
    2
    I think so but that is referring to forms, I just want it in a field.

    I'll put it simply.

    One table BAGNAMES:

    Bag Name : Weight
    1.5KGBAG 1.50
    2.5KGBAG 2.50

    Next Table Orders:

    Customer : Qty : BagName : Weight
    Joe 1 (Lookup from BAGNAMES)1.5KGBAG (Autofill/Calculation/Lookup whatever it's called voilą) 1.50

    Select the bag name, *poof* Weight field automatically fills.

  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
    Most of us would recommend not working directly in tables. You have little control and no events to use code from. You can use a lookup field for one piece of data, but most of us would recommend against it:

    http://www.theaccessweb.com/lookupfields.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 2
    Last Post: 08-29-2018, 04:42 AM
  2. Replies: 1
    Last Post: 08-13-2015, 12:05 PM
  3. Replies: 14
    Last Post: 05-30-2014, 01:59 PM
  4. Create a lookup field
    By timmyjc18 in forum Access
    Replies: 1
    Last Post: 08-29-2012, 08:52 PM
  5. Using Lookup to Create a new Field
    By jtinjr in forum Access
    Replies: 1
    Last Post: 09-25-2010, 11:30 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