Results 1 to 8 of 8
  1. #1
    Sam is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2022
    Posts
    50

    Question on Lookup


    So I have 3 tables related through their PKs.
    I have input data in table 02Enquiries through a Form, where the user has option to make multiple Choices and these are stored in the table.
    After, s/he has made a final choice from the choices, the 3rd table needs to be filled in. As much as I have tried using the Lookup Wizard, I'm not able to input one of the Choices (02Enquiries) into Choice (Table1). It always puts in all the Choices. Is there a way to select one of the Choices.Click image for larger version. 

Name:	Screenshot 2022-11-12 164201.jpg 
Views:	33 
Size:	60.8 KB 
ID:	49098

  2. #2
    Sam is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2022
    Posts
    50
    Update - OK, I could run a Query and flattened the Choices.Values Thanks to MS Support site.

  3. #3
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,566
    Hi

    Your relationships are wrong.

    01Units table has a PK of UnitID

    The related table should have a field named UnitID which would be the FK
    You would then set up a 1 to Many relationahip between these 2 tables by linking the PK to the FK.
    It is also recommended that you do not use MVF in tables
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  4. #4
    Sam is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2022
    Posts
    50
    Is it mandatory to use the same name for the PK/FK. The Choices.Values are the UnitID numbers from 01Units table.

    So I should use, Choice1, Choice2, Choice3 as fields for the Choices an intending buyer may make, instead of keeping the choices together. I did consider that.

  5. #5
    Join Date
    Apr 2017
    Posts
    1,681
    As Mike did write - don't use multi-value fields, they are evil
    So I should use, Choice1, Choice2, Choice3 as fields for the Choices an intending buyer may make, instead of keeping the choices together.
    So choices must be UnitID's from table 01Units. And you have several such values in single row of 02Enquiries!
    Instead remove the field Choices from 02Enquiries at all. In this table, you'll keep the general info about specific inquiry. And you need another table, where you enter info about which units are included, like
    EnquiryDetails: EnquiryDetailID, EnquiryID, UnitID, ... (you may have here additional fields about specific unit in this Enquiry containing info you can't have in 01Units table, like inquired quantity, current price, etc.). NB! There may be any number of rows in EnquiryDetails table linked to single row in 02Enquiries table.

  6. #6
    Sam is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2022
    Posts
    50
    That's what I am thinking. If you see my other post
    https://www.accessforums.net/showthr...413#post503413
    I have broken down the choices that a prospect may make into different entries in Enquiries, linked to the same Prospect.

  7. #7
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,566
    Hi Sam
    Can you upload a zipped copy of your database?
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  8. #8
    Sam is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2022
    Posts
    50
    NewAttempt.zip

    It is still a work-in-progress. I have not made most of the tables. Going step by step. But here's a copy.

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

Similar Threads

  1. Lookup Table Question
    By Beanie_d83 in forum Access
    Replies: 2
    Last Post: 06-17-2016, 07:38 AM
  2. Lookup Column Question
    By agure in forum Database Design
    Replies: 6
    Last Post: 02-10-2014, 01:15 PM
  3. Lookup question
    By Mike106 in forum Forms
    Replies: 3
    Last Post: 12-31-2012, 01:17 PM
  4. Lookup Question
    By Lookup in forum Import/Export Data
    Replies: 11
    Last Post: 11-12-2012, 08:31 PM
  5. Lookup Question
    By uaguy3005 in forum Access
    Replies: 1
    Last Post: 05-22-2012, 03:02 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