Results 1 to 4 of 4
  1. #1
    ortizimo is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2017
    Location
    FL
    Posts
    88

    Using a drop-down menu selection to also check other boxes

    Is there a way to use a drop-down menu and depending on the selection use that to check additional boxes in another area of the form like the header area? Example:



    From the drop-down menu select Sega and a checkbox named Cartridge is checked.

  2. #2
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,511
    Absolutely, use the AfterUpdate event of the combobox. There are number of different ways to do the code but here is one.

    If me.combobox = "Sega Then
    me.Cartridge = True
    Else
    If me.Combobox = "Wii" Then
    me.Wii = True
    End If
    End If

    Could also use a Case Statement. Also if you want to blank out any previous checkboxes you can set them all to False to start with, then do the code above.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Code that does not use If Then:

    Me.Cartridge = Me.Combobox = "Sega"
    Me.Wii = Me.Combobox = "Wii"
    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.

  4. #4
    ortizimo is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2017
    Location
    FL
    Posts
    88
    Quote Originally Posted by Bulzie View Post
    Absolutely, use the AfterUpdate event of the combobox. There are number of different ways to do the code but here is one.

    If me.combobox = "Sega Then
    me.Cartridge = True
    Else
    If me.Combobox = "Wii" Then
    me.Wii = True
    End If
    End If

    Could also use a Case Statement. Also if you want to blank out any previous checkboxes you can set them all to False to start with, then do the code above.
    Thanks, that worked.

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

Similar Threads

  1. Replies: 10
    Last Post: 07-22-2014, 03:40 PM
  2. Replies: 2
    Last Post: 05-29-2014, 09:58 PM
  3. Attaching dates to drop down check boxes
    By JLL12345 in forum Access
    Replies: 3
    Last Post: 02-10-2014, 10:57 AM
  4. Auto text based on drop menu selection
    By mandykoonts in forum Forms
    Replies: 6
    Last Post: 01-06-2014, 04:17 PM
  5. Replies: 2
    Last Post: 08-14-2013, 04:29 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