Results 1 to 5 of 5
  1. #1
    blh5 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    2

    If Value entered is outside of range then activate comment box

    Hello,



    Is there a way to activate a text field only if the value entered in another field is outside of a certain range?.... for example if field1 is <5 OR >10 THEN activate the other text field....


    Thank you in advance for your help!

  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,652
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    if somefield <5 or somefield >10 then
    thattextbox.visible = true
    other things to do with thattextbox
    else
    thattextbox.visible = false

    endif

    (untested, just a thought)

  4. #4
    blh5 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    2
    Perfect! Thanks for the fast response!

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Note that you'll typically need that code in the AfterUpdate event of the pertinent Control, (somefield, in the example) as well as in the Form_Current event.

    Also note that this will only work for a Single View Form. To do something similar for Continuous View or Datasheet View Forms requires using Conditional Formatting, and CF does not allow form making Controls either Visible or Invisible, only for Enabling/Disabling them.

    Linq ;0)>

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

Similar Threads

  1. Duplicate Comment into all records
    By Marianna_Air in forum Forms
    Replies: 22
    Last Post: 08-22-2012, 08:04 PM
  2. Help - activate hidden control
    By Belxaviar1973 in forum Forms
    Replies: 2
    Last Post: 08-31-2010, 09:20 AM
  3. Comment History
    By botts121 in forum Programming
    Replies: 0
    Last Post: 07-02-2009, 01:02 PM
  4. Inserting Comment on a cell??
    By yotapower10 in forum Access
    Replies: 6
    Last Post: 06-29-2009, 08:20 AM
  5. Problem when activate the Visual Basic Editor
    By milo in forum Programming
    Replies: 0
    Last Post: 05-21-2007, 09:05 AM

Tags for this Thread

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