Results 1 to 7 of 7
  1. #1
    Join Date
    May 2011
    Posts
    13

    Unanswered: Dissociate radio buttons from check boxes

    Hey up,

    Stuck with an odd problem. I'm creating a few VBA forms in MS Access to support the database. For some illogical reason though my radio buttons and check boxes are being associated with each other, so I can't check the check box and also select one of the radio options, it's one or the other.

    I can't seem to find any property that defines them as part of the group.. I just want them completely dissociated with each other.

    Anybody able to offer any advise? Thanks.

    Adam

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Offhand it sounds like an Option Group where you copied and pasted a button (which assumes the same option value so when it's pushed, it's the same as the other option value.)
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    May 2011
    Posts
    13
    Thanks for your reply. What you said rang a bell, and after a bit more playing around I realised you have to create them in their own separate "frame" / "option group", or they get associated. That through me off as I've been using frames to split up sections of the form. Anyway..

    One more question if that's alright? Which part of the form do you use to name an option? I have the frame, two radio buttons and two labels. If I try setting the two radio buttons to the same name I get an error. Would I just give them separate names and check them separately within the VB?

    Thanks again.

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Assign a different name to each of them (several controls cannot share the same name in an Access Form) and also a different Option Value. You identify the checked (or selected) control through testing the Value property of the Option Group control, in the AfterUpdate event of this control for instance.
    Have a nice day!

  5. #5
    Join Date
    May 2011
    Posts
    13
    Fantastic, thank you. Finally getting somewhere with this now, though can't say I'm a fan of VBA! This may sound utterly stupid, but how do you un-check a check box? I don't mean through code, literally in the UI. I check it, then I can't un-check it

  6. #6
    Join Date
    May 2011
    Posts
    13
    Bump.. Anyone?

  7. #7
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    995
    Provided Answers: 2
    A check box changes its state whenever you click it. Make sure that it doesn't have code in the Click() event that's keeping it set to True.
    10% of magic is knowing something that no-one else does. The rest is misdirection.

Posting Permissions

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