Disable possible? Subform on value of option group

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform (frmProducts) on a form (frmFollow). On frmProducts, there
is an option group called Frame289 (at the moment).

Based on the selection in this group, is it possible to disable the
remainder of frmProducts or all the other controls?

I am aware that I can disable the controls based on the value of a checkbox
but I'm unsure about an option group.

Thanks for your help.
 
Hu cindy,

The Value of an option group will be the "OptionValue"
property of the option in the group that is chosen

use the AfterUpdate event of the OptionGroup Frame and also
the form OnCurrent event to test whether the controls should
be enabled or disabled

ie:

select case nz(me.OptionGroup.controlname)
case 1,2
'statements
case 3
'statements
case else
'statements
end select

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access
strive4peace2006 at yahoo.com
 
Excellent Crystal. Thanks, I'll give that a go. If I have any more probs I'll
post back here.

Thanks heaps

Kind regards
Cindy
 
You're welcome, Cindy ;) happy to help

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access
strive4peace2006 at yahoo.com
 
Ok I've given this a go and I had it working but I changed something and now
I can't get it back!

Can you clarify what the OptionGroup and ControlName would be?

I have

Private Sub StatusBar_AfterUpdate()

Select Case Nz(Me.OptionGroup.StatusBar)

Case 3
MsgBox "Email customer care"
DoCmd.GoToControl ("cmdCustomerCare")
Case 7
Me.AllowEdits , 0
Case 8
Me.InvoiceNumber.Enabled = False
Me.OrderReference.Enabled = False
Me.Quantity.Enabled = False
End Select

End Sub

Thanks heaps
 
Hi Cindy,

OptionGroup* is your frame
*(that is what Access calls it if you look in the title bar
of the properties window)

ControlName is the NAME property of your frame

Is StatusBar the name of your frame?
if so, you would use:

Select Case Nz(Me.StatusBar)

you should also have a

Case else

with any statements that would be processed if one of the
above choices was not selected -- unless 3, 7, and 8 are all
of them ;)

.... that is, if you want to do something else, like enable
controls

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access
strive4peace2006 at yahoo.com
 
Hi cindy,

I see where the confusion started...

OptionGroup.controlname
was supposed to be
OptionGroup_controlname

my fingers weren't fast enough for my brain ;)

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access
strive4peace2006 at yahoo.com
 
You're welcome, Cindy ;) happy to help

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access
strive4peace2006 at yahoo.com
 
Back
Top