Results 1 to 2 of 2
  1. #1
    jle0003 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    60

    checkbox dependencies

    I have a form that has a subform. There is a combobox on the Main form and a combobox plus a checkbox on the subform.

    I would like the checkbox automatically checked or unchecked based on the values selected in both comboboxes.

    For example, if I select "red" from the main form combobox AND "apple" from the subform combobox, I want the checkbox to automatically check.
    Or if I select "red" from the main form combobox and I select "banana" from the subform combobox then I want the checkbox to automatically uncheck.


    I also need these to dynamically refresh so that the user does not have to make changes to both comboboxes for the checkbox to refresh.\

    I have tried everything I know about dependent comboboxes and requerying and nothing is working. Any ideas? Some sample code would be much appreciated!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,967
    Code would have to be in the AfterUpdate event of both comboboxes.

    Example of code for the color combo:
    If Me.colorbox = "red" And Me.subformcontainername.Form.comboname = "apple" Then Me.subformcontainername.Form.checkname = True
    ElseIf ...

    See what you have got yourself into? Why do you need the checkbox?
    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. Object dependencies
    By Rob S in forum Access
    Replies: 4
    Last Post: 08-03-2012, 04:00 PM
  2. Report that shows Query dependencies
    By ChuckColeman1812 in forum Access
    Replies: 3
    Last Post: 01-08-2012, 12:15 PM
  3. Form Dependencies
    By Juan4412 in forum Forms
    Replies: 15
    Last Post: 06-20-2011, 06:40 PM
  4. Output Object Dependencies
    By Tigger in forum Database Design
    Replies: 3
    Last Post: 04-28-2011, 08:18 AM
  5. Can't eliminate Object Dependencies
    By skahle89 in forum Access
    Replies: 1
    Last Post: 12-02-2010, 11:21 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