By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,829 Members | 1,829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,829 IT Pros & Developers. It's quick & easy.

How to get properties of option button?

P: n/a
Access 2000

How can I get the properties of the selected option button within an option
group?

With the code below it returns the 'HelpcontextID) of the option group, and
not the ID associated with the selected button.

Me.ActiveControl.Properties("HelpcontextId")

Thanks for any help.

Adrian
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Since you are using ActiveControl, I'm guessing that this is a generic piece
of code that gets called when the user presses F1. If that is the case, it
would probably be a lot easier to just include all of the options in that
help page or have the option group call a page with links that take you to
each of the options.

--
Wayne Morgan
MS Access MVP
"Adrian" <no****@hotmail.com> wrote in message
news:bv*******************@news.demon.co.uk...
Access 2000

How can I get the properties of the selected option button within an option group?

With the code below it returns the 'HelpcontextID) of the option group, and not the ID associated with the selected button.

Me.ActiveControl.Properties("HelpcontextId")

Thanks for any help.

Adrian

Nov 12 '05 #2

P: n/a
Wayne,

Thanks for your reply.
have the option group call a page with links

That was my fallback strategy! But I had hoped it would not be too difficult
to take the user directly to the correct help page.

Adrian.

"Wayne Morgan" <co***************************@hotmail.com> wrote in message
news:My******************@newssvr23.news.prodigy.c om... Since you are using ActiveControl, I'm guessing that this is a generic piece of code that gets called when the user presses F1. If that is the case, it
would probably be a lot easier to just include all of the options in that
help page or have the option group call a page with links that take you to
each of the options.

--
Wayne Morgan
MS Access MVP
"Adrian" <no****@hotmail.com> wrote in message
news:bv*******************@news.demon.co.uk...
Access 2000

How can I get the properties of the selected option button within an

option
group?

With the code below it returns the 'HelpcontextID) of the option group,

and
not the ID associated with the selected button.

Me.ActiveControl.Properties("HelpcontextId")

Thanks for any help.

Adrian


Nov 12 '05 #3

P: n/a
On Tue, 27 Jan 2004 12:17:02 -0000, Adrian wrote:

Try using the following in the AfterUpdate event of the OptionGroup. Not
entirely simple, but not all that complicated either. Remember to change
the control names to what you are using.

Dim cntrl As Control
For Each cntrl In Me!OptionGroup.Controls
If cntrl.ControlType = ac(OptionButtonType) Then
If cntrl.OptionValue = Me!OptionGroup Then
Me!OptionGroup.HelpContextId = cntrl.HelpContextId
End If
End If
Next cntrl

--
Mike Storr
veraccess.com

Wayne,

Thanks for your reply.
have the option group call a page with links

That was my fallback strategy! But I had hoped it would not be too

difficult to take the user directly to the correct help page.

Adrian.


Nov 12 '05 #4

P: n/a
Mike,

Thanks very much. That works very nicely.

Any ideas of how to pass the helpcontextid for a tab (page) to the
helpcontextid for the form? I cannot find an event that fires when the
active tab changes.

Thanks again.

Adrian

"Mike Storr" <st******@sympatico.ca> wrote in message
news:1b******************************@40tude.net.. .
On Tue, 27 Jan 2004 12:17:02 -0000, Adrian wrote:

Try using the following in the AfterUpdate event of the OptionGroup. Not
entirely simple, but not all that complicated either. Remember to change
the control names to what you are using.

Dim cntrl As Control
For Each cntrl In Me!OptionGroup.Controls
If cntrl.ControlType = ac(OptionButtonType) Then
If cntrl.OptionValue = Me!OptionGroup Then
Me!OptionGroup.HelpContextId = cntrl.HelpContextId
End If
End If
Next cntrl

--
Mike Storr
veraccess.com

Wayne,

Thanks for your reply.
have the option group call a page with links


That was my fallback strategy! But I had hoped it would not be too

difficult
to take the user directly to the correct help page.

Adrian.


Nov 12 '05 #5

P: n/a
On Wed, 28 Jan 2004 10:47:35 GMT, Adrian wrote:

It depends on what triggers the move to a new page. The Click event applies
to each page in the tabcontrol, so you could use it to set
Me.HelpContextID = Me!TabControl.Pages("PageName").HelpContextID.
The OnChange event of the tabcontrol itself fires when the focus moves to a
different page. You can also use the Value property of the tabcontrol -
which is the selected page.
--
Mike Storr
veraccess.com

Mike,

Thanks very much. That works very nicely.

Any ideas of how to pass the helpcontextid for a tab (page) to the
helpcontextid for the form? I cannot find an event that fires when the
active tab changes.

Thanks again.

Adrian

"Mike Storr" <st******@sympatico.ca> wrote in message
news:1b******************************@40tude.net.. .
On Tue, 27 Jan 2004 12:17:02 -0000, Adrian wrote:

Try using the following in the AfterUpdate event of the OptionGroup. Not
entirely simple, but not all that complicated either. Remember to change
the control names to what you are using.

Dim cntrl As Control
For Each cntrl In Me!OptionGroup.Controls
If cntrl.ControlType = ac(OptionButtonType) Then
If cntrl.OptionValue = Me!OptionGroup Then
Me!OptionGroup.HelpContextId = cntrl.HelpContextId
End If
End If
Next cntrl

--
Mike Storr
veraccess.com

Wayne,

Thanks for your reply.

> have the option group call a page with links

That was my fallback strategy! But I had hoped it would not be too

difficult
to take the user directly to the correct help page.

Adrian.


Nov 12 '05 #6

P: n/a
Mike,

Thanks for your help. That has given me some ideas to have a look at.

Adrian

"Mike Storr" <st******@sympatico.ca> wrote in message
news:1m*****************************@40tude.net...
On Wed, 28 Jan 2004 10:47:35 GMT, Adrian wrote:

It depends on what triggers the move to a new page. The Click event applies to each page in the tabcontrol, so you could use it to set
Me.HelpContextID = Me!TabControl.Pages("PageName").HelpContextID.
The OnChange event of the tabcontrol itself fires when the focus moves to a different page. You can also use the Value property of the tabcontrol -
which is the selected page.
--
Mike Storr
veraccess.com

Mike,

Thanks very much. That works very nicely.

Any ideas of how to pass the helpcontextid for a tab (page) to the
helpcontextid for the form? I cannot find an event that fires when the
active tab changes.

Thanks again.

Adrian

"Mike Storr" <st******@sympatico.ca> wrote in message
news:1b******************************@40tude.net.. .
On Tue, 27 Jan 2004 12:17:02 -0000, Adrian wrote:

Try using the following in the AfterUpdate event of the OptionGroup. Not entirely simple, but not all that complicated either. Remember to change the control names to what you are using.

Dim cntrl As Control
For Each cntrl In Me!OptionGroup.Controls
If cntrl.ControlType = ac(OptionButtonType) Then
If cntrl.OptionValue = Me!OptionGroup Then
Me!OptionGroup.HelpContextId = cntrl.HelpContextId
End If
End If
Next cntrl

--
Mike Storr
veraccess.com
Wayne,

Thanks for your reply.

>> have the option group call a page with links

That was my fallback strategy! But I had hoped it would not be too
difficult
to take the user directly to the correct help page.

Adrian.


Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.