Results 1 to 8 of 8
  1. #1
    wiredgecko is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2014
    Location
    greenacres florida
    Posts
    4

    Hide labels


    i would like to know how to do the following:

    i have a form which has option button A and option button B. i have two labels, A and B. i would like label A to appear if option button A is chosen and label B to remain non-visible and vice versa.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    I use only VBA code, not macros.

    Are these radio buttons in an option group?

    Code behind the option group AfterUpdate event like.

    Me.labelA.Visible = (Me.optiongroup = 1)
    Me.labelB.Visible = (Me.optiongroup = 2)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Also, if they are not in Option Group, then you will need to refer to the control itself. Like June, I was unsure which type and setup you have!

  4. #4
    wiredgecko is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2014
    Location
    greenacres florida
    Posts
    4
    these are just two individual option button. button A is: "showroom sale" and button B is: "home sale". our salesperson picks which type of sale it is

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    You have two fields? If a record can have only one or the other then this should be one field with two choices. Use combobox OR option group control with radio buttons within the option group.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    wiredgecko is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2014
    Location
    greenacres florida
    Posts
    4
    thanks i'll give it a shot

  7. #7
    wiredgecko is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2014
    Location
    greenacres florida
    Posts
    4
    ok I gave it a shot but get an error. my apologies but i am a beginner trying something out of my league. do i actually enter "OptionGroup" or something else

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums