Results 1 to 7 of 7
  1. #1
    Lounger
    Join Date
    Jan 2005
    Location
    Jacksonville, North Carolina, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    enabling a text box (Access 2000/SP3)

    I'm trying to figure out how I can make a text box enable itself when a user chooses the "other ..." option from a combo box, but otherwise be disabled from the form.

    BTW - as a new user to Access and Woody's Lounge I'm often looking for answers to simple/redundant questions; is there any way to search this site for answers? I can only imagine how many times questions are repeated. <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>

    Thanks!!

  2. #2
    4 Star Lounger
    Join Date
    Sep 2004
    Location
    Sacramento, California, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: enabling a text box (Access 2000/SP3)

    Turn the enabled property of the text box to False

    In the After Update event for the combo box use:

    If <font color=blue>yourcomboboxname </font color=blue> = "Other" Then
    <font color=blue>yourtextboxname</font color=blue> .Enabled = Ture
    End If

    You can find a search link in the top links bar of the lounge (just under the Lex graphic)

    Carla

  3. #3
    Lounger
    Join Date
    Jan 2005
    Location
    Jacksonville, North Carolina, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: enabling a text box (Access 2000/SP3)

    thank you x 1000

  4. #4
    Lounger
    Join Date
    Jan 2005
    Location
    Jacksonville, North Carolina, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: enabling a text box (Access 2000/SP3)

    I'm sorry, but I just can't figure out how to use that code. I tried putting it in every possible way (ie. text in the "After Update" field, code builder, expression builder, etc). This is how it translates to my form.

    Private Sub ProblemDescription_AfterUpdate()

    If ProblemDescription = "Other ..." Then
    ProblemOther.Enabled = True
    End If

    End Sub

    When I put the code in (and disable the text box), it just stays disabled ... even if my ProblemDescription combo box says Other ...

    Does it matter that the combo box gets its values from a different table?

    Thanks,

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: enabling a text box (Access 2000/SP3)

    Is "Other" in the bound column of the combobox? If not, you need to reference the actual value or else use a column reference for the comparison. For example, if you have the combobox bound on column 1 but that column is not the display value, then you have to reference the display column, for example,
    <code>If Me.ProblemDescription.Column(1) = "Other" Then .... </code>
    Charlotte

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: enabling a text box (Access 2000/SP3)

    Once you have worked out what the code in the After Update event of the combo box is, you probably want to use the same code in the On Current event of the form, so that the text box is enabled/disabled correctly when the user moves from record to record. (This assumes that your form is bound to a table or query)

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: enabling a text box (Access 2000/SP3)

    To elaborate on Carla's reply: there is a 'Search' button in the Lounge menu bar. You have several search options - see screenshot and <!help=09>Help 09<!/help>.

Posting Permissions

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