If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Help with checkboxes
I have 5 checkboxes and I was wondering if I could make it so that when one
checkbox is ticked all the others can't or with some only certain ones can be ticked Morning Afternoon Evening Evening Extension Special Booking When morning is ticked nothing else can be ticked Same for afternoon When evening is ticked only evening extension can be ticked aswell And finally when special booking is ticked evening extension is ticked automatically If anyone could help I would be very grateful |
#2
|
|||
|
|||
Help with checkboxes
In the After_Update event of each checkbox put the code that sets the
state of every other checkbox. that you want to set to a given state. HTH -- -Larry- -- "Stibbz" wrote in message ... I have 5 checkboxes and I was wondering if I could make it so that when one checkbox is ticked all the others can't or with some only certain ones can be ticked Morning Afternoon Evening Evening Extension Special Booking When morning is ticked nothing else can be ticked Same for afternoon When evening is ticked only evening extension can be ticked aswell And finally when special booking is ticked evening extension is ticked automatically If anyone could help I would be very grateful |
#3
|
|||
|
|||
Help with checkboxes
It sounds as if a combination of option buttons and checkboxes would fit
the Windows UI guidelines better. Option buttons are intended for situations where the user can only choose one of two or more options, and checkboxes for where the options are independent of each other. So maybe you need Option group buttons for Morning, Afternoon, Evening Checkboxes for Evening Extension and Special Booking and code along these lines: When Morning or Afternoon is selected, both checkboxes are disabled. When Evening is selected, both checkboxes are enabled. When Special Booking is checked, Evening Extension is automatically checked. In the option group's Change event, it would be something like this: Select Case ogTimePeriod Case 0, 1 'Morning, ckEveExtension.Value = False ckEveExtension.Enabled = False ckSpecialEvent.Value = False ckSpecialEvent.Enabled = False Case Else 'Evening ckEveExtension.Enabled = True ckSpecialEvent.Enabled = True End Select In ckSpecialEvent_Change, something like this: Me.ckEveExtension.Value = Me.ckSpecialEvent.Value Depending on the exact behaviour you want, it may be better to use the Exit or After_Update events instead of Change. On Thu, 23 Feb 2006 13:10:28 -0800, Stibbz wrote: I have 5 checkboxes and I was wondering if I could make it so that when one checkbox is ticked all the others can't or with some only certain ones can be ticked Morning Afternoon Evening Evening Extension Special Booking When morning is ticked nothing else can be ticked Same for afternoon When evening is ticked only evening extension can be ticked aswell And finally when special booking is ticked evening extension is ticked automatically If anyone could help I would be very grateful -- John Nurick [Microsoft Access MVP] Please respond in the newgroup and not by email. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add checkboxes with macro in Merge document? | Bryan L | Tables | 3 | October 19th, 2005 04:05 PM |
Calculate Query and Checkboxes | jackle | Running & Setting Up Queries | 0 | August 2nd, 2005 12:13 PM |
Dynamic Checkboxes | Bari Samad | Using Forms | 2 | June 25th, 2005 05:57 PM |
Calculating Multiple Checkboxes with If Statements | Playa | Setting Up & Running Reports | 2 | December 20th, 2004 09:25 PM |
Printing Problems involvong columns with checkboxes | Greg | General Discussion | 1 | August 22nd, 2004 10:13 PM |