Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Mar 2004
    Location
    Christchurch
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    conditional locking (2003)

    Hi, I am wanting to have a text box enabled and to require an entry, only if the value in another text box meets certain criteria. Otherwise the text box would not be enabled. I am not sure which event to add an if statement to, nor of the right code to use. Could someone suggest some generic code that would make this happen?

    Thank you.
    Roger

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: conditional locking (2003)

    You can enable/disable a text box through conditional formatting:
    - Open the form in design view.
    - Select the text box.
    - Select Format | Conditional Formatting..
    - Select "Expression Is" from the first dropdown under Condition 1.
    - Enter the condition under which the text box is to be disabled, for example
    <code>
    [Amount] < 300
    </code>
    or
    <code>
    [InvoiceDate] Between #01/01/2000# And #12/31/2005#
    </code>
    or
    <code>
    [State] In ("New York","Connecticut","Rhode Island")
    </code>
    - Click the Enabled button on the right hand side below the condition so that it is "off".
    - Click OK.

  4. #3
    2 Star Lounger
    Join Date
    Mar 2004
    Location
    Christchurch
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: conditional locking (2003)

    Thank you - that works nicely :-)

    Roger

Posting Permissions

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