Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004

    Unanswered: Validation rule in design View (not equal to)


    THis might be a stupid question to some of you guys but I'm relatively new to MS Access (I'm using XP) and am trying to make a field called "GBI Approver" not allow you to enter the same name as is already entered into the preceding field called "GBI Writer". These are both fields in a table "Main Table"

    I've fiddled about with it with little success - Can anyone help?

  2. #2
    Join Date
    Jun 2002
    Mpls/St.Paul area
    You can't do it from the table.

    You can create a form for data entry that will do some checking.
    From a form you could have some code check the user's entry on the control GBI approver control.
    Look at the properties for the control on the form. One of them is BeforeUpdate.
    From here, create an [Event Procedure] and check to see if the value of the GBI Writer entry is the same as the GBI Approver.

    if me.txtGBIApprover = me.txtGBIWriter then
        msgbox "You cant make a duplicate entry.",vbokonly,"What are you thinking?"
        cancel = true
    end if
    This is the day the Lord has made, I will rejoice and be glad in it.

Posting Permissions

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