Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Is an Option Button Selected?

Discussion in 'Information Technology' started by HotRod, Jul 28, 2006.

  1. HotRod

    HotRod
    Expand Collapse
    Guest

    How can you tell if an option button is selected? Option276. ???
     
  2. Loading...

    Similar Threads Forum Date
    Adoption: Why is it Taboo? Hard Talk Jun 21, 2013
    USA Florida Court Voids Adoption Of Millionaire’s Girlfriend As Sham Breaking News Mar 29, 2013
    Opinion Dog loving babas of Juna Akhada advocate adoption of street dogs Breaking News Jan 21, 2013
    Controversial Only option for fading churches is to again take up evangelization Hard Talk Dec 26, 2012
    Introducing New Functionality: Dislikes Option Announcements Apr 12, 2012

  3. Michael H

    Michael H
    Expand Collapse
    Guest

    Check the button's Value property. It will be -1 if selected, 0 if not
    selected.

    -Michael



    "HotRod" wrote:

    > How can you tell if an option button is selected? Option276. ???
    >
    >
    >
     
  4. HotRod

    HotRod
    Expand Collapse
    Guest

    When I use Option275.Value I get the Error "you entered an expression that
    has no value"






    "Michael H" <MichaelH@discussions.microsoft.com> wrote in message
    news:4FDE514C-F5F4-4C84-BD32-660662E6C487@microsoft.com...
    > Check the button's Value property. It will be -1 if selected, 0 if not
    > selected.
    >
    > -Michael
    >
    >
    >
    > "HotRod" wrote:
    >
    >> How can you tell if an option button is selected? Option276. ???
    >>
    >>
    >>
     
  5. HotRod

    HotRod
    Expand Collapse
    Guest

    Think I got the problem fixed since the Option button is part of a group I
    need to reference the frame instead of the option button. One more question.

    Is it possible to turn field1 or field2 or field3 to "1/Yes" based on the
    value of option275.value = 3 or do I need to add additional boxes to my form
    and link to them. Does this make sense.




    "HotRod" <NOSPAM@youremail.com> wrote in message
    news:%23jk1VB6mGHA.2256@TK2MSFTNGP04.phx.gbl...
    > How can you tell if an option button is selected? Option276. ???
    >
     
  6. HotRod

    HotRod
    Expand Collapse
    Guest

    Or if the answer is 3 how can I turn just field 3 as the source.


    "HotRod" <NOSPAM@youremail.com> wrote in message
    news:%23jk1VB6mGHA.2256@TK2MSFTNGP04.phx.gbl...
    > How can you tell if an option button is selected? Option276. ???
    >
     
  7. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    HotRod,

    Can you tell us a little about the purpose of your Option Group? And
    what is "field 3"? So far, it's not easy to get a picture of what
    you're form is like and what you are trying to do.

    --
    Steve Schapel, Microsoft Access MVP

    HotRod wrote:
    > Or if the answer is 3 how can I turn just field 3 as the source.
    >
    >
    > "HotRod" <NOSPAM@youremail.com> wrote in message
    > news:%23jk1VB6mGHA.2256@TK2MSFTNGP04.phx.gbl...
    >> How can you tell if an option button is selected? Option276. ???
    >>

    >
    >
     
  8. HotRod

    HotRod
    Expand Collapse
    Guest

    I am creating an input form to track the answers of a survey that was
    created several years ago, because of this I can't change the way the data
    is stored (A lot of code has been developed over the years based on the
    format) So if the survey has 10 questions each question can have one answer,
    either a,b,c,d,e or f. I've been able to make the option button groups but I
    need to tie each answers to a different field.

    If fo example the answer for Question 1 was d I would need to set field

    Q1a = false
    Q1b = false
    Q1c = false
    Q1d = True
    Q1e = false
    Q1f = false


    "Steve Schapel" <schapel@mvps.org.ns> wrote in message
    news:O7$55T7mGHA.3372@TK2MSFTNGP03.phx.gbl...
    > HotRod,
    >
    > Can you tell us a little about the purpose of your Option Group? And what
    > is "field 3"? So far, it's not easy to get a picture of what you're form
    > is like and what you are trying to do.
    >
    > --
    > Steve Schapel, Microsoft Access MVP
    >
    > HotRod wrote:
    >> Or if the answer is 3 how can I turn just field 3 as the source.
    >>
    >>
    >> "HotRod" <NOSPAM@youremail.com> wrote in message
    >> news:%23jk1VB6mGHA.2256@TK2MSFTNGP04.phx.gbl...
    >>> How can you tell if an option button is selected? Option276. ???
    >>>

    >>
     
  9. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    HotRod,

    If you have 6 separate Yes/No fields in the database for each of the
    questions, and that's where the answer is ultimately stored, then I
    would forget the idea of an Option Group. What are you binding the
    Option Group to? I would suggest using an Option Button on the form
    bound to each of the 6 fields. You can arrange them on the form in
    groups, of course. And if you want, you can use code on each button to
    enforce only one selection, for example...
    Private Sub Q1d_AfterUpdate()
    If Me.Q1d Then
    Me.Q1a = False
    Me.Q1b = False
    Me.Q1c = False
    Me.Q1e = False
    Me.Q1f = False
    End If
    End Sub

    The alternative is more complex code on the After Update event of the
    option group to write the valuus to the answer fields, and I think you
    would also need to add extra fields to the table for the Option Group
    values.

    --
    Steve Schapel, Microsoft Access MVP

    HotRod wrote:
    > I am creating an input form to track the answers of a survey that was
    > created several years ago, because of this I can't change the way the data
    > is stored (A lot of code has been developed over the years based on the
    > format) So if the survey has 10 questions each question can have one answer,
    > either a,b,c,d,e or f. I've been able to make the option button groups but I
    > need to tie each answers to a different field.
    >
    > If fo example the answer for Question 1 was d I would need to set field
    >
    > Q1a = false
    > Q1b = false
    > Q1c = false
    > Q1d = True
    > Q1e = false
    > Q1f = false
    >
     

Share This Page