Validation Rule

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ggtw
    New Member
    • Jul 2007
    • 33

    Validation Rule

    Hi,

    I am trying to set a simple validation rule so that when my form is being filled out it the fields cannot be blank. I am somewhat knew to writing expressions and stuff so any assistance woul dbe greatly appreciated.

    Thank you in advance
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Originally posted by ggtw
    Hi,

    I am trying to set a simple validation rule so that when my form is being filled out it the fields cannot be blank. I am somewhat knew to writing expressions and stuff so any assistance woul dbe greatly appreciated.

    Thank you in advance
    Hi.

    You can make it on table level setting a corresponding table field "Required" property to "Yes".

    Comment

    • ggtw
      New Member
      • Jul 2007
      • 33

      #3
      Originally posted by FishVal
      Hi.

      You can make it on table level setting a corresponding table field "Required" property to "Yes".

      Hi, Thanks for the response. I have done that already but it never worked. my situation is that I have data already entered and I need it so that when others are filling out the form I created they cannot move on to the next field if it is blank. I changed the "Required" property to yes already with no other changes. Am I missing something or do I need to do anything else?

      Thanks

      Comment

      • FishVal
        Recognized Expert Specialist
        • Jun 2007
        • 2656

        #4
        Originally posted by ggtw
        Hi, Thanks for the response. I have done that already but it never worked. my situation is that I have data already entered and I need it so that when others are filling out the form I created they cannot move on to the next field if it is blank. I changed the "Required" property to yes already with no other changes. Am I missing something or do I need to do anything else?

        Thanks
        Ok. The following code in Exit event handler for form control Text4 will avoid moving to another field as long as Text4 is empty. It will however allow to move focus to another form.
        Code:
        Private Sub Text4_Exit(Cancel As Integer)
            If IsNull(Me.Text4) Then Cancel = True
        End Sub

        Comment

        • ggtw
          New Member
          • Jul 2007
          • 33

          #5
          Thank you I got it to work. Thanks for your help.

          Comment

          • FishVal
            Recognized Expert Specialist
            • Jun 2007
            • 2656

            #6
            Originally posted by ggtw
            Thank you I got it to work. Thanks for your help.
            Glad it was helpful.

            Comment

            Working...