PC Review


Reply
Thread Tools Rate Thread

CheckBox within a frame

 
 
ArneGolf
Guest
Posts: n/a
 
      15th Feb 2010
I have some checkboxes grouped within a frame so once I select one, put a
check in the box, I have to have one of the boxes checked. Is there a way to
allow all boxes to be unchecked once one has been checked?
 
Reply With Quote
 
 
 
 
Duane Hookom
Guest
Posts: n/a
 
      15th Feb 2010
The Option Group has a value property. You can use code to set the value to
something that isn't one of the option values. You could try Null or a large
number.

--
Duane Hookom
Microsoft Access MVP


"ArneGolf" wrote:

> I have some checkboxes grouped within a frame so once I select one, put a
> check in the box, I have to have one of the boxes checked. Is there a way to
> allow all boxes to be unchecked once one has been checked?

 
Reply With Quote
 
ArneGolf
Guest
Posts: n/a
 
      15th Feb 2010
I am too new at this and am not sure how or where to do that.

"Duane Hookom" wrote:

> The Option Group has a value property. You can use code to set the value to
> something that isn't one of the option values. You could try Null or a large
> number.
>
> --
> Duane Hookom
> Microsoft Access MVP
>
>
> "ArneGolf" wrote:
>
> > I have some checkboxes grouped within a frame so once I select one, put a
> > check in the box, I have to have one of the boxes checked. Is there a way to
> > allow all boxes to be unchecked once one has been checked?

 
Reply With Quote
 
Duane Hookom
Guest
Posts: n/a
 
      15th Feb 2010
Assuming your frame is named "fraYourFrameName", you can select it in design
view and open its properties. Find the "On Dbl Click..." property and change
it to [Event Procedure]. Click the [...] button on the right to open the code
window and make sure your code looks something like the following:

Private Sub fraYourFrameName_DblClick(Cancel As Integer)
Me.fraYourFrameName.Value = Null
End Sub

Double-clicking the frame in form view will now un-select all options. They
will all appear with grayishness in the option buttons.

--
Duane Hookom
Microsoft Access MVP


"ArneGolf" wrote:

> I am too new at this and am not sure how or where to do that.
>
> "Duane Hookom" wrote:
>
> > The Option Group has a value property. You can use code to set the value to
> > something that isn't one of the option values. You could try Null or a large
> > number.
> >
> > --
> > Duane Hookom
> > Microsoft Access MVP
> >
> >
> > "ArneGolf" wrote:
> >
> > > I have some checkboxes grouped within a frame so once I select one, put a
> > > check in the box, I have to have one of the boxes checked. Is there a way to
> > > allow all boxes to be unchecked once one has been checked?

 
Reply With Quote
 
ArneGolf
Guest
Posts: n/a
 
      16th Feb 2010
I tried adding the code but it still will not let me unselect both boxes.
This is all the code when I open Code Builder. Maybe someone can tell me what
is wrong:
Private Sub cmdResetStock_Click()
Stock.Value = 0
fraStocks.DefaultValue = ""
End Sub

Private Sub Form_Activate()

End Sub

Private Sub Form_DblClick(Cancel As Integer)

End Sub

Private Sub Form_load()
Form.TimerInterval = 1000
End Sub

'Private Sub Form_Timer()
' lblDateAndTime.Caption = vbCrLf & Format(Now(), "long date") & _
' vbCrLf & vbCrLf & Format(Now(), "long time")
'End Sub


Private Sub Command175_Click()
On Error GoTo Err_Command175_Click

Dim stDocName As String

stDocName = "Billing"
DoCmd.OpenReport stDocName, acPreview

Exit_Command175_Click:
Exit Sub

Err_Command175_Click:
MsgBox Err.Description
Resume Exit_Command175_Click

End Sub
Private Sub Billing_Report_Click()
On Error GoTo Err_Billing_Report_Click

Dim stDocName As String

stDocName = "Billing"
DoCmd.OpenReport stDocName, acPreview

Exit_Billing_Report_Click:
Exit Sub

Err_Billing_Report_Click:
MsgBox Err.Description
Resume Exit_Billing_Report_Click

End Sub

Private Sub fraCartShed_DblClick(Cancel As Integer)
Me.fraCartShed.Value = Null
End Sub


Private Sub Mailing_Labels_Click()
On Error GoTo Err_Mailing_Labels_Click

Dim stDocName As String

stDocName = "Labels Membership Purchase"
DoCmd.OpenReport stDocName, acPreview

Exit_Mailing_Labels_Click:
Exit Sub

Err_Mailing_Labels_Click:
MsgBox Err.Description
Resume Exit_Mailing_Labels_Click

End Sub
Private Sub Advanced_Search_Click()
On Error GoTo Err_Advanced_Search_Click


Screen.PreviousControl.SetFocus
DoCmd.RunCommand acCmdFind

Exit_Advanced_Search_Click:
Exit Sub

Err_Advanced_Search_Click:
MsgBox Err.Description
Resume Exit_Advanced_Search_Click

End Sub
Private Sub Cart_Sheds_Alphabetical_Click()
On Error GoTo Err_Cart_Sheds_Alphabetical_Click

Dim stDocName As String

stDocName = "Cart Sheds Alphabetical"
DoCmd.OpenReport stDocName, acPreview

Exit_Cart_Sheds_Alphabetical_Click:
Exit Sub

Err_Cart_Sheds_Alphabetical_Click:
MsgBox Err.Description
Resume Exit_Cart_Sheds_Alphabetical_Click

End Sub
Private Sub Cart_Sheds_Numerical_Click()
On Error GoTo Err_Cart_Sheds_Numerical_Click

Dim stDocName As String

stDocName = "Cart Sheds Numerical"
DoCmd.OpenReport stDocName, acPreview

Exit_Cart_Sheds_Numerical_Click:
Exit Sub

Err_Cart_Sheds_Numerical_Click:
MsgBox Err.Description
Resume Exit_Cart_Sheds_Numerical_Click

End Sub


"Duane Hookom" wrote:

> Assuming your frame is named "fraYourFrameName", you can select it in design
> view and open its properties. Find the "On Dbl Click..." property and change
> it to [Event Procedure]. Click the [...] button on the right to open the code
> window and make sure your code looks something like the following:
>
> Private Sub fraYourFrameName_DblClick(Cancel As Integer)
> Me.fraYourFrameName.Value = Null
> End Sub
>
> Double-clicking the frame in form view will now un-select all options. They
> will all appear with grayishness in the option buttons.
>
> --
> Duane Hookom
> Microsoft Access MVP
>
>
> "ArneGolf" wrote:
>
> > I am too new at this and am not sure how or where to do that.
> >
> > "Duane Hookom" wrote:
> >
> > > The Option Group has a value property. You can use code to set the value to
> > > something that isn't one of the option values. You could try Null or a large
> > > number.
> > >
> > > --
> > > Duane Hookom
> > > Microsoft Access MVP
> > >
> > >
> > > "ArneGolf" wrote:
> > >
> > > > I have some checkboxes grouped within a frame so once I select one, put a
> > > > check in the box, I have to have one of the boxes checked. Is there a way to
> > > > allow all boxes to be unchecked once one has been checked?

 
Reply With Quote
 
ArneGolf
Guest
Posts: n/a
 
      16th Feb 2010
Got it. Had a misspelling in the frame name. Thanks

"Duane Hookom" wrote:

> Assuming your frame is named "fraYourFrameName", you can select it in design
> view and open its properties. Find the "On Dbl Click..." property and change
> it to [Event Procedure]. Click the [...] button on the right to open the code
> window and make sure your code looks something like the following:
>
> Private Sub fraYourFrameName_DblClick(Cancel As Integer)
> Me.fraYourFrameName.Value = Null
> End Sub
>
> Double-clicking the frame in form view will now un-select all options. They
> will all appear with grayishness in the option buttons.
>
> --
> Duane Hookom
> Microsoft Access MVP
>
>
> "ArneGolf" wrote:
>
> > I am too new at this and am not sure how or where to do that.
> >
> > "Duane Hookom" wrote:
> >
> > > The Option Group has a value property. You can use code to set the value to
> > > something that isn't one of the option values. You could try Null or a large
> > > number.
> > >
> > > --
> > > Duane Hookom
> > > Microsoft Access MVP
> > >
> > >
> > > "ArneGolf" wrote:
> > >
> > > > I have some checkboxes grouped within a frame so once I select one, put a
> > > > check in the box, I have to have one of the boxes checked. Is there a way to
> > > > allow all boxes to be unchecked once one has been checked?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
reference frame caption associated with a checkbox novice973 Microsoft Excel Programming 2 8th Apr 2008 11:53 PM
add checkbox to an option frame Mark J Kubicki Microsoft Access Forms 1 6th Nov 2006 06:53 AM
checkbox hideing frame =?Utf-8?B?RmVsaXBl?= Microsoft Outlook VBA Programming 1 17th Nov 2005 02:31 PM
Adding checkbox within a frame =?Utf-8?B?QWppdA==?= Microsoft Excel Programming 1 22nd Dec 2004 05:44 PM
Chart sizes with window frame checkbox frozen in "ON' state =?Utf-8?B?RnJhbmsgVmF1Z2hu?= Microsoft Excel Crashes 0 22nd Sep 2004 12:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:10 PM.