Results 1 to 13 of 13
  1. #1
    Join Date
    May 2004
    Posts
    14

    Question Unanswered: Access Option Button Command

    Here is my situation. I have a main form that people see with several options to go to other windows. At the top of the form i have a group of radio buttons each with its own value. There is a button called data entry and what i want to happen is when a person selects one of the radio buttons at the top and they click the data entry button and it brings up that form it detects what radio button has been selected and puts a value into a hidden column based on that information. I have attempted to do this several different ways and have had no success. What is the best way to accomplish this?

  2. #2
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    Okay you have a bunch of radio buttons that allow the user to select them, and when the person then clicks the button it should open the form relating to that radio button?

    If that is what you are wanting to happen you will most likely have to do it through VBA. Are you comfortable with VBA? Do you have some code you have already written that we could work from to help you along?

    I hope I can help,
    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

  3. #3
    Join Date
    May 2004
    Posts
    14
    well basically it will always open the same form no matter what radio button is selected, it will just fill a certain value into a particular column. I am somewhat comfortable using vba but am not too good with it.


    Private Sub Command8_Click()

    Dim openform As String
    Dim stLinkCriteria As String


    openform = "Computer Data Entry"

    If Option20.Enabled = True Then
    schoolvar = "gchs"
    DoCmd.openform openform, , , , acFormAdd, acWindowNormal

    ElseIf Option22.Enabled = True Then
    DoCmd.openform openform, , , , acFormAdd, acWindowNormal
    schoolvar = "gcms"

    End If
    End Sub


    I had tried something like that but no matter what it always puts gchs in the value no matter what value is selected.

  4. #4
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    Okay so when the form is completely opened that schoolvar goes into some column right?

    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

  5. #5
    Join Date
    May 2004
    Posts
    14
    yes that is correct

  6. #6
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    How did you create the radio buttons? One at a time or using the option group wizard?

    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

  7. #7
    Join Date
    May 2004
    Posts
    14
    i used the option group wizard, there are about 12 buttons. i guess the option group name would be "schools" that is what the label on the top says

  8. #8
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    Okay I know why your stuff isnt working... your option22 is always enabled... that is why it only comes with that value...

    I would need to see your form / database so I could write the code to work for you.

    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

  9. #9
    Join Date
    May 2004
    Posts
    14
    do you have an email address i could send it to you at?

  10. #10
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    Yea... in my info click my s/n

    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

  11. #11
    Join Date
    May 2004
    Posts
    14
    it doesnt give me an address. just the option to send you a message and it will not allow me to attach a file in doing it that way.

  12. #12
    Join Date
    Mar 2004
    Location
    Nashville, TN
    Posts
    557
    Okay goto my webpage... click the contact us page. That way I dont have to publish my email on here :-P. Last time I did that I got like 10 emails from random people asking for help.

    I am sorry it took me so long to respond. I got busy at work

    JS
    Have you ever thought about thinking on purpose?

    Jarvis Stubblefield
    Patriot Designs
    Web/Database Development and Consulting
    The-Patriot.net by Patriot Designs

  13. #13
    Join Date
    Sep 2011
    Posts
    1

    option button

    can someone help me, my problem is different from the one posted here. i Have a 4 option button. the 2 option button has another text box to fill up but in the same form and if that button will selected the text box will automatically appear. how can i do this.

    pls help me. thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •