Results 1 to 4 of 4
  1. #1
    GregShah is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    Canton, Ohio
    Posts
    60

    Conditional Combo Box on Subform

    Currently, I have two separate forms/subforms to help me enter data. The main difference on the two forms is that depending on one record on the main form, the combo list on the subform changes. Would it be possible for me to create a single form, enter the variable value on the main form and then, based on this value, the subform choose between two different combo boxes?

    Having two forms is not horrible but I often have to switch back and forth between main forms which is cumbersome.

    Thanks for your input,

    Greg

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    should not need to choose between two combos if the controlsource is the same - just change the rowsource to the combo in the subform in the after update event to the control where you enter the valriable value

  3. #3
    GregShah is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    Canton, Ohio
    Posts
    60
    Not sure exactly what you mean. Let me explain my purpose better.

    In the main form, I select either day shift or night shift. In the subform combo box, the employee list either has day employees on the list or night employees. Right now. I have a "day" and a "night' form with each subform using the proper combo box.

    I would like to be able to select either day or night in the main form and then have the combo box automatically select from the right list of employees.

    Is this how you understood my question?

    Thanks for your reply.

    Greg

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    in your subform combo rowsource you would have something like

    SELECT *
    FROM tblEmployees
    WHERE shift=[parent].[cboShift]

    it may need to be requeried in the subform current event

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

Similar Threads

  1. Replies: 5
    Last Post: 09-16-2015, 10:32 PM
  2. Replies: 2
    Last Post: 01-21-2013, 10:38 PM
  3. SubForm with query conditional combo boxes
    By ThebigCt in forum Forms
    Replies: 1
    Last Post: 02-28-2012, 05:13 PM
  4. Conditional Combo Boxes on a form
    By ThebigCt in forum Access
    Replies: 1
    Last Post: 02-06-2012, 08:08 PM
  5. subform to subform conditional post
    By RANCHLAW56 in forum Forms
    Replies: 11
    Last Post: 12-28-2010, 06:33 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