Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2008
    Posts
    15

    Unanswered: Validation Rule as a warning?

    Im wondering if its possible to use a Validation rule as just a warning? For instance could I have a validation rule in my table that says [itemA] > [itemB] but make it so that if Item B is greater than Item A it just asks if thats ok? This way I can be sure that I actually wanted it to be that way and that it wasnt just an entry mistake? I would only overrule the rule once in a while but need to have that option to leave it.

    Hope that made sence thanks for any advice.

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    If you are talking about at the table level, then the answer is no.

    You can do it in a form by using a touch of VBA in the BeforeUpdate property for the field you want to have the warning on:

    Code:
    If [itemA] > [itemB] Then
       If MsgBox("Item A is larger than Item B.  Do you want to allow this?", vbYesNo+vbQuestion, "Warning") = vbNo Then Cancel = True
    End If
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Aug 2008
    Posts
    15
    Thanks... I have never done anything at all in VB so I will see if I can make that happen. Appreciate the reply.

    Thanks

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    You're most welcome
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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