Results 1 to 4 of 4
  1. #1
    vdanelia is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2011
    Posts
    38

    Enabling Disabling Combo Boxes from Values

    Hello Dear friends, I have a question about Enabling Disabling Combo Boxes From 1 Combo Box Value.

    I have 1 combo box [Warrtype] with values "Nowarranty, Year, Month, Day" I also have
    1 Text Box [Warranty]
    1 Text Box - Date/Time [Warroff]

    I disabled both of the text boxes from the property sheet to disable.

    If I choose from combo box the values "Year, Month, Days" the disabled combo boxes must be enabled, if i choose from combo box value "Nowarranty" all the text boxes must be locked again:
    I did something like, but not working correctly....
    I set the event procedure on combo box onEnter:



    Select Case Me.WARRTYPE
    Case "Year"
    Case "Month"
    Case "Day"
    Me.Warranty.Enabled = True
    Me.Warroff.Enabled = True
    Case "Nowarranty"
    Me.Warranty.Enabled = false
    Me.Warroff.Enabled = false
    End Select

    Please correct my mistakes or suggest the best variant...

    Thank you in advanced

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Define "not working correctly". Off the top, I'd use the after update event of the combo, plus the current event of the form.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    vdanelia is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2011
    Posts
    38
    Working Perfectly, Thanks

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    No problem; so it was just in the wrong event?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Restricting values in combo boxes
    By Remster in forum Access
    Replies: 4
    Last Post: 09-08-2010, 12:24 PM
  2. Replies: 1
    Last Post: 03-27-2010, 06:13 AM
  3. Replies: 2
    Last Post: 08-24-2009, 10:36 AM
  4. Replies: 10
    Last Post: 08-01-2009, 06:48 AM
  5. Replies: 7
    Last Post: 05-16-2009, 08:08 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