Results 1 to 3 of 3
  1. #1
    googalabosh is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Posts
    48

    Drop Down to list to specific record

    Here is the basic idea:


    Tables-
    1) Cars
    2) Parts

    Query-
    Cars linked to Parts

    I want to create a form that starts with a drop-down. I would pick the car I want which then shows me a list below it (subform) of all the parts related to that car. Then I want to click on the part in the list and have it show me all the information on that particular part in another subform. How would you do this?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    subform? why not the main form?

    1. you can filter the list of all records:

    Code:
    sub cboBox_afterupdate()
    if isNull(cboBox) then
       me.filterOn = false
    else
       me.filter = "[Field]='" & cboBoxx & "'"
       me.filterOn = true
    endif
    end sub



    or 2, the combo box has 2 columns, 1 Caption, 2, query
    Cars, qsCars
    Parts, qsParts

    Hide column 2, so user only sees the caption.
    when user selects the item, use the query (in column 2) to attache to the list (or subform)

    sub cboBox_afterupdate()
    subform.sourceObject = cboBox

    end sub

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Apply filter criteria to subform Filter property and turn on filter with FilterOn property.

    Another option is to synchronize the two subforms. Review https://www.fmsinc.com/MicrosoftAcce...edSubforms.asp
    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.

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

Similar Threads

  1. Replies: 3
    Last Post: 09-21-2019, 05:16 PM
  2. Replies: 8
    Last Post: 08-23-2019, 07:19 PM
  3. Replies: 6
    Last Post: 11-24-2018, 02:25 PM
  4. Replies: 5
    Last Post: 08-06-2018, 05:31 PM
  5. Replies: 2
    Last Post: 03-02-2015, 12:19 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