Results 1 to 3 of 3
  1. #1
    Sightly is offline Novice
    Windows 8 Access 2016
    Join Date
    May 2020
    Posts
    4

    Need a pop up warning to appear when data entered is not in a specified range.

    I have a table with a list of parameters and the ranges these parameters should be in. I have a form that is going to be used for daily checks to make sure everything is running in these parameters and I want to have a pop up message appear if something is out of the range. I think I could use an event update on the box to check but I don’t know how to have it compare to values in another table. Any help would be greatly appreciated!!

  2. #2
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,165
    Can you define your table structure? How your fields/rows are actually constrained isn't quite clear. You would normally just use validation rules https://codekabinett.com/rdumps.php?...alidation-rule

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    something like:

    Code:
    sub txtBox_afterupdate()
    ValidateDataRange txtBox
    end sub
    
    
    sub ValidateDataRange(pvVal)
    
    select case true case pvVal < Dlookup("[LowVal]", "table") msgbox "Value is too low",,"out of range"
    case pvVal > Dlookup("[HighVal]", "table")
    msgbox "Value is too high",,"out of range"
    end select end sub


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

Similar Threads

  1. Replies: 7
    Last Post: 08-19-2019, 11:13 PM
  2. Replies: 1
    Last Post: 10-09-2015, 09:29 AM
  3. Replies: 14
    Last Post: 01-07-2014, 04:20 PM
  4. Replies: 4
    Last Post: 12-14-2012, 09:24 PM
  5. Replies: 2
    Last Post: 07-30-2012, 03:26 PM

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