Results 1 to 4 of 4
  1. #1
    Allienne is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Dec 2018
    Posts
    3

    Link One Combobox to Another Combobox

    Hello!

    I have a form with a combo box. Inside that form I have a subform with another combo box. In ComboBox1 there is a Job #. In ComboBox2 I want the proposal Number that connects to that Job # so I can populate data using that. I would also like ComboBox2 to default to the top item which should be the specific proposal number.

    Click image for larger version. 

Name:	ComboBox Help.jpg 
Views:	13 
Size:	58.1 KB 
ID:	36555

    If I can't link the ComboBox1 to ComboBox2, is there a way to link ComboBox1 to a TextBox in that subform instead?



    Thank you!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    You select JobNo and want combo2 to be limited to proposals associated with that job number? The main and subform are linked by JobNo (Master/Child Links)?

    What you want is called cascading comboboxes, a common topic.

    Advise not using space nor punctuation/special characters (underscore only exception) in naming convention.
    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.

  3. #3
    apr pillai's Avatar
    apr pillai is offline Competent Performer
    Windows 10 Access 2007
    Join Date
    May 2010
    Location
    Alappuzha, India
    Posts
    209
    1. Create a SELECT Query, with the Main Form ComboBox Source Data, use the JOB# combobox current contents as criteria to filter the data as Source for the second ComboBox on the Sub-Form.
    2. On the Main Form Combobox Click_Event you must add me.comboxname.Refresh in the Form module, to update the underlying query, based on the change of JOB# in the Combobox.
    3. Use the new Query Recordset as Source for the second Combobox.


    When you Click on the JOB# Combobox to select an item from the list, it's corresponding Proposal Number list will appear in the Sub-Form Combobox.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Review https://www.accessforums.net/showthread.php?t=74891

    Yes subform combobox can reference textbox in subform, such as the textbox holding the JobNo foreign key. What data is entered into the subform?
    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: 7
    Last Post: 12-29-2016, 11:43 PM
  2. how to link 2 combobox
    By maram007 in forum Access
    Replies: 2
    Last Post: 02-24-2014, 01:31 AM
  3. Combobox to link to 2 queries
    By mark81 in forum Forms
    Replies: 3
    Last Post: 01-08-2014, 12:49 PM
  4. Replies: 0
    Last Post: 08-24-2010, 06:38 PM
  5. Link ComboBox to field in a table
    By DrDebate in forum Forms
    Replies: 0
    Last Post: 04-27-2007, 08:03 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