Results 1 to 5 of 5
  1. #1
    Zxs is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2020
    Posts
    1

    Lookup Wizard

    Dear all, i have a question related lookup wizard that seek for your kind advise and thanks in adv.



    I have 2 tables. Parent and Child.

    Parent Table: Printer
    Field: ID(PK), Name, Mode(Integer, FK of child table Mode)
    Example:
    1, Section A, 1
    2, Section B, 2

    Child Table: Mode
    Field: ID(PK), Name
    Example:
    1, Portrait
    2, Landscape

    Problem: In the Printer table (view mode), I wanted to create a lookup field to display the Mode Name (portrait or landscape) for field mode instead of the ID, but when i use the lookup wizard for the mode column that link to the Mode table, the name field is missing, only left the ID field where i can select from, may i know why?

    thank you.

  2. #2
    moke123's Avatar
    moke123 is online now Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    Dont use a lookup field in your table . Use a combobox on your Form

    If your combo box is not displaying the correct column of the underlying query, check the column count and column width in the combos property sheet..

  3. #3
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I will second Moke123 about the Look up FIELDS.... Here are a couple of articles as to the reason why
    The Evils of Lookup Fields in Tables and
    Issues with Table Level Lookup Fields


    Also, "Name" is a reserved word in Access and shouldn't be used as an object name. Problem names and reserved words in Access


    Note: I changed your table/field names


    Click image for larger version. 

Name:	OneToMany.png 
Views:	19 
Size:	80.1 KB 
ID:	40602
    I have 2 tables. Parent and Child.
    Not to nitpick, but I have never heard of a Parent or Child table. You can have 2 or more tables that are related, but that does not make either one a Parent or child.

    On a FORM that has a record source of "tblPrinters" or a query based on table "tblPrinters", you would have a combo box control bound to the field "PrintOrientation_FK". with a Row source of
    Code:
    SELECT tblPrintOrientation.OrientationID_PK, tblPrintOrientation.Orientation
    FROM tblPrintOrientation
    ORDER BY tblPrintOrientation.Orientation;
    Set the
    Column Count : 2
    Column Widths : 0


    Or, since the options are limited/stable for orientations, you could set the combo box Row Source Type to "Value List" and type in the orientations for the Row Source.




    OK, I'll get off my soapbox now. No offense meant for you..... just a little venting.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    I have heard parent/child to describe table relationships. Synonymous with master/child as in form Master/Child Links property.

    Parent and child tables in the sense that cannot be record in child table without corresponding record in parent table, such records known as 'orphans'.

    Other synonyms: Master, Main, Primary, Dependent.

    I agree, don't set lookups in table.
    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
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Steve
    Many thanks for providing such a clear and detailed explanation for the OP (as you always do!)
    Also thanks for providing a link to my website article which I'd completely forgotten about writing!
    You really should have your own website of Access hints and tips.

    As for 'parent/child' tables, I do occasionally use those phrases for convenience when discussing relationships and referential integrity.
    For example see this extended article http://www.mendipdatasystems.co.uk/r...ps1/4594533224
    However I don't think its standard terminology and I tend to use quote marks in such cases.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Lookup Wizard Help
    By bonnepoutine in forum Access
    Replies: 1
    Last Post: 05-24-2018, 12:33 PM
  2. Lookup Wizard
    By JennyL in forum Access
    Replies: 3
    Last Post: 01-23-2017, 01:42 PM
  3. LOOKUP WIZARD, is it possible?
    By finsmith in forum Programming
    Replies: 5
    Last Post: 01-24-2013, 09:45 AM
  4. lookup wizard
    By dafdek in forum Access
    Replies: 1
    Last Post: 01-10-2013, 04:57 PM
  5. Lookup wizard
    By VLI in forum Forms
    Replies: 7
    Last Post: 01-28-2011, 09:25 AM

Tags for this Thread

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