Results 1 to 2 of 2
  1. #1
    jmany01 is offline Novice
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    3

    Intelligent Combo Boxes

    This may be somewhat confusing to explain but I'll give it a shot.



    Table A which simply lists a field of various screw sizes.
    Table B lists a field of thread pitches as the primary key but the second field is a lookup field of Table A that has the capability of selecting multiple screw sizes.

    Table A
    Screw Size
    1/4"
    3/8"
    1/2"


    Table B
    Thread Pitch -------- Screw Size
    16 ------------------ 3/8", 1/2"
    24 ------------------ 1/4", 3/8", 1/2"
    30 ------------------ 1/4", 3/8"

    I'm creating a form to create screw parts. The form has a combo box first to select the screw size. There is also a combo box to select the thread pitch but i want that combo box to only allow the option of selecting thread pitches that are associated with that specific screw size as specified in Table B. I know how to do this via code in VB which would modify the Row Source Property of the thread pitch combo box in the form and hard code the options in but I'd like to incorporate the intelligence of Table B so I wouldn't have to edit the code of the form every time a new thread pitch was added.

    Any help would be appreciated.

  2. #2
    jmany01 is offline Novice
    Windows XP Access 2007
    Join Date
    May 2012
    Posts
    3
    Answered my own problem.
    I wasn't aware of the ability of using the WHERE capabilities in the RowSource. so the row source for the thread pitch combo box looks like this

    combo_threadpitch.RowSource = "SELECT [Table B].[Thread Pitch].[Value] FROM [Table B] WHERE [Table B].[Screw Size]=combo_screwsize.value"

    note: combo_ denotes the name of a combo box in my form

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

Similar Threads

  1. Replies: 9
    Last Post: 06-04-2014, 10:45 AM
  2. Help with Combo Boxes
    By Lxmanager in forum Access
    Replies: 1
    Last Post: 02-08-2012, 02:52 PM
  3. Combo boxes
    By seanh3 in forum Forms
    Replies: 2
    Last Post: 07-20-2011, 10:39 AM
  4. combo boxes
    By thewabit in forum Forms
    Replies: 7
    Last Post: 01-01-2010, 08:51 PM
  5. combo boxes
    By labrams in forum Forms
    Replies: 0
    Last Post: 04-20-2006, 09:28 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