Results 1 to 2 of 2
  1. #1
    slenderman1 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Apr 2016
    Posts
    1

    How do you enter validation rule for this?

    If I wanted to make the values in "x" field to be greater than the values in "y" field. How would I write that?

    Thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    You wouldn't put it in the validation rule field,
    youd have a 'save' button to validate the fields.

    Code:
    sub btnSave_click()
    select case true
    Case txtBox1<txtBox2
      MsgBox "bad fields"
    case isNull (cboBox )
       MsgBox "you must select a city"
    case else
       Docmd.close
    Ens select
    End sub

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

Similar Threads

  1. Replies: 2
    Last Post: 06-16-2015, 03:52 AM
  2. Validation Rule
    By JeffGeorge in forum Forms
    Replies: 4
    Last Post: 02-27-2015, 04:12 PM
  3. IIf in Validation Rule
    By Bugsy in forum Access
    Replies: 6
    Last Post: 11-21-2011, 11:33 AM
  4. Help with validation rule
    By Desstro in forum Programming
    Replies: 5
    Last Post: 02-27-2011, 08:05 PM
  5. Validation Rule
    By smitstev in forum Access
    Replies: 5
    Last Post: 06-30-2009, 09:58 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