Results 1 to 3 of 3
  1. #1
    chauncey274 is offline Novice
    Windows 8 Access 2003
    Join Date
    Oct 2015
    Posts
    5

    Disable/Enable TextBox in Tabular Form?

    Hey guys, Thanks in advance for any help. This is probably a very simple thing for some of the guys here but have searched and cant find anything.

    I have a tabular form for users to enter items into. I have a checkbox for them to select if this item is a certain type, and I want that checkbox to disable a few textbox's and enable a few textbox's. Basically, if it's checked, enable these, uncheck enable the other ones. I'm trying to do this so that the users don't waste time entering information that isn't needed for that type of item, but I also don't want a seperate form for these items as all of this goes hand in hand and is very useful to have all together on one form.

    I currently have this code:

    Private Sub CheckIndPr_Click()
    If CheckIndPr.Value = False Then


    Combo49.Enabled = False
    Combo50.Enabled = True
    Else
    Combo49.Enabled = True
    Combo50.Enabled = False
    End If
    End Sub

    My problem is that the code is being applied to every single row of the form. I have 10 items entered and if I check just one of the boxes, say on row 3, it disables Combo50 for all 10 rows etc. Is there a way to make a code like this work for only that 1 row?

    Thanks!

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    you need to use conditional formatting

    for combo49 the rule would be - Expression is....Formula..=Not [CheckindPr]...select the disabled option
    for combo50 the rule would be - Expression is....Formula..=[CheckindPr]...select the disabled option

    you don't need any events for this

  3. #3
    chauncey274 is offline Novice
    Windows 8 Access 2003
    Join Date
    Oct 2015
    Posts
    5
    Quote Originally Posted by Ajax View Post
    you need to use conditional formatting

    for combo49 the rule would be - Expression is....Formula..=Not [CheckindPr]...select the disabled option
    for combo50 the rule would be - Expression is....Formula..=[CheckindPr]...select the disabled option

    you don't need any events for this
    That works great. I was trying to reinvent the wheel I guess, lol. Thanks for your help!

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

Similar Threads

  1. Replies: 9
    Last Post: 05-04-2014, 04:26 PM
  2. Replies: 4
    Last Post: 03-05-2013, 09:03 AM
  3. Password Form With Enable/Disable Shift Key
    By burrina in forum Code Repository
    Replies: 0
    Last Post: 12-24-2012, 10:53 PM
  4. Replies: 3
    Last Post: 08-02-2012, 10:27 AM
  5. Replies: 1
    Last Post: 02-25-2011, 10:03 AM

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