Results 1 to 4 of 4
  1. #1
    rosscortb is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    52

    Help displaying combo selection other than ID.

    Hello,

    Hoping you can help as don't think I've done this correctly.

    I have Employee Table
    (ID)
    Name etc

    Position Table
    (ID)
    (Position Name)



    Position History Table
    (ID)
    (Employee ID)
    Position ID)
    Start Date
    End Date

    I have created a from with Employee(ID) and sub form with Position History Table
    I was wanting to have the position name as a combo box so the user can select the new position name that the employee has, any ideas?



    Thanks

    Ross
    Attached Thumbnails Attached Thumbnails SS98.PNG  

  2. #2
    Minty is offline VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,158
    Make your combo with 2 columns, bring in the ID and Position and then make the column widths 0; 2

    That should do what you want.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    rosscortb is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    52
    Thanks. Is this through a query rather than bringing in the whole Position History table?

  4. #4
    Join Date
    Apr 2017
    Posts
    1,792
    1. You open the form in design mode, and add a combo box, or you activate an existing one;
    2. When the property sheet for combo bos is not active, activate it (right-click on combo, select Properties);
    3. Activate Data tab in Property Sheet;
    4. For property Row Source Type select "Table/Query";
    5. Into field Row Source enter SQL string like
    Code:
    SELECT pt.[ID], pt.[PositionName] FROM PositionTable pt ORDER BY 2;
    ;
    6. Set property Bound Column to 1;
    7. Activate Format tab of Property Sheet;
    8. Set property Column Count to 2;
    9. Set property Column Widths to 0cm;2cm (the width of 2nd column may be any reasonable non-zero numeric value - it doesn't really affect anything).

    That's all!

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

Similar Threads

  1. Replies: 3
    Last Post: 09-09-2018, 12:45 PM
  2. Replies: 2
    Last Post: 06-16-2015, 10:55 AM
  3. Replies: 7
    Last Post: 03-30-2015, 10:04 AM
  4. Replies: 5
    Last Post: 04-09-2014, 06:57 PM
  5. Replies: 1
    Last Post: 10-30-2012, 10:29 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