Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2009
    Location
    Ohio, United States
    Posts
    167

    Unanswered: Forms: Make Text box locked/unlocked or enabled/disabled by option button

    I have an option group with two option buttons:
    1. Enter the footage and have the diameter calculated
    2. Enter the diameter and have the footage calculated
    I also have two text boxes, one for diameter, the other for footage. What I would like to do is enable the item needing entered for entry and lock the other item and change the background and border to transparent. How would I go about doing this? Thanks, Joshua

  2. #2
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580
    During the _afterUpdate of the option group

    If me.youroptiongroup = 1

    me.yourtextboxA.enabled =true
    me.yourtextboxA.BackColor = 16777215 'White
    me.yourtextboxA.BorderStyle = 1 'Solid

    me.yourtextboxB.enabled = false
    me.yourtextboxB.BackColor = 255 'Red
    me.yourtextboxB.BorderStyle = 0 ' Transparent

    else

    me.yourtextboxA.enabled =false
    me.yourtextboxA.BackColor = 255 'Red
    me.yourtextboxA.BorderStyle = 0 ' Transparent

    me.yourtextboxB.enabled = true
    me.yourtextboxB.BackColor = 16777215 'White
    me.yourtextboxB.BorderStyle = 1 ' Solid

    EndIf
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

Posting Permissions

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