Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / February 2006

Tip: Looking for answers? Try searching our database.

Disable possible? Subform on value of option group

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
albycindy - 20 Feb 2006 12:20 GMT
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.
Crystal - 20 Feb 2006 15:05 GMT
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

> I have a subform (frmProducts) on a form (frmFollow). On frmProducts, there
> is an option group called Frame289 (at the moment).
[quoted text clipped - 6 lines]
>
> Thanks for your help.
albycindy - 20 Feb 2006 15:18 GMT
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

> Hu cindy,
>
[quoted text clipped - 34 lines]
> >
> > Thanks for your help.
Crystal - 21 Feb 2006 05:35 GMT
You're welcome, Cindy ;) happy to help

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.
[quoted text clipped - 42 lines]
>>>
>>>Thanks for your help.
albycindy - 22 Feb 2006 11:59 GMT
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

> You're welcome, Cindy ;) happy to help
>
[quoted text clipped - 52 lines]
> >>>
> >>>Thanks for your help.
Crystal - 23 Feb 2006 04:43 GMT
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

> Ok I've given this a go and I had it working but I changed something and now
> I can't get it back!
[quoted text clipped - 78 lines]
>>>>>
>>>>>Thanks for your help.
Crystal - 23 Feb 2006 04:54 GMT
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

> Ok I've given this a go and I had it working but I changed something and now
> I can't get it back!
[quoted text clipped - 78 lines]
>>>>>
>>>>>Thanks for your help.
albycindy - 23 Feb 2006 09:40 GMT
Excellento!!! Understand now! Thankyou very much.

> Hi cindy,
>
[quoted text clipped - 96 lines]
> >>>>>
> >>>>>Thanks for your help.
Crystal - 23 Feb 2006 16:57 GMT
You're welcome, Cindy ;) happy to help

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access
strive4peace2006 at yahoo.com

> Excellento!!! Understand now! Thankyou very much.
>
[quoted text clipped - 98 lines]
>>>>>>>
>>>>>>>Thanks for your help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.