validation rule error

desibasha

Registered User.
Local time
Today, 05:24
Joined
Feb 12, 2004
Messages
27
i have a field named publisher name in which you obviously type in a publisher's name, but for some odd reason it keeps giving me an error "Please enter a value between 1-10!. This error message was a data validation/rule I had created for a group of fields named product risk criteria, product risk weightings, publisher risk criteria, and publisher risk weightings. I have deleted the rule from all of those. And the error does not come in those fields. But for some odd reason keeps appearing when a user tries to input a publisher name in the publisher field. What could be causing this? How is this possible? Any help is greatly appreciated.

Thanks!!!!! :)
 
i figured it out.
thanks anyways all :)


:) :) :) :) :) :)
desibasha said:
i have a field named publisher name in which you obviously type in a publisher's name, but for some odd reason it keeps giving me an error "Please enter a value between 1-10!. This error message was a data validation/rule I had created for a group of fields named product risk criteria, product risk weightings, publisher risk criteria, and publisher risk weightings. I have deleted the rule from all of those. And the error does not come in those fields. But for some odd reason keeps appearing when a user tries to input a publisher name in the publisher field. What could be causing this? How is this possible? Any help is greatly appreciated.

Thanks!!!!! :)
 
I am trying a validation rule using VBA for my Date of Birth field, however even if the field is valid I get the msgbox message I put in the code. Plese help. This is the code.

If (DOB.Value < 1912) Or (DOB.Value > 1994) Then
MsgBox ("Date is Invalid, Member May Not Qualify Or A User Error Has Occurred. Please Review")
Cancel = True
End If

Do I have the <, > backwards?
 
I am trying a validation rule using VBA for my Date of Birth field, however even if the field is valid I get the msgbox message I put in the code. Plese help. This is the code.

If (DOB.Value < 1912) Or (DOB.Value > 1994) Then
MsgBox ("Date is Invalid, Member May Not Qualify Or A User Error Has Occurred. Please Review")
Cancel = True
End If

Do I have the <, > backwards?


The corrected version:

Code:
If ([B][COLOR=red]Me![/COLOR][/B]DOB < [B][COLOR=red]#[/COLOR][/B]1912[B][COLOR=red]#[/COLOR][/B]) Or ([B][COLOR=red]Me![/COLOR][/B]DOB > [COLOR=red][B]#[/B][/COLOR]1994[B][COLOR=red]#[/COLOR][/B]) Then
MsgBox ("Date is Invalid, Member May Not Qualify Or A User Error Has Occurred. Please Review")
Cancel = True
End If
 
I gave it a try and I got a Compile Error Message Expected Expression: With this line highlighted

Private Sub Form_BeforeUpdate(Cancel As Integer)

I'm new at this you, can probably tell it by now.
 
Last edited:
Did you type that in or did Access do that for you? And is there an

End Sub

after that and after any code that might be put in under that event header (meaning the Private Sub Form_BeforeUpdate(Cancel As Integer part)
 
Code:
If ([B][COLOR=red]Me![/COLOR][/B]DOB < [B][COLOR=red]#[/COLOR][/B]1912[B][COLOR=red]#[/COLOR][/B]) Or ([B][COLOR=red]Me![/COLOR][/B]DOB > [COLOR=red][B]#[/B][/COLOR]1994[B][COLOR=red]#[/COLOR][/B]) Then

A year only value isn't a valid date string in A2007 at least.

Try this:
Code:
If (Me!DOB < #1/1/1912#) Or (Me!DOB > #12/31/1994#) Then
 
A year only value isn't a valid date string in A2007 at least.

Try this:
Code:
If (Me!DOB < #1/1/1912#) Or (Me!DOB > #12/31/1994#) Then
oops! I experienced extreme brainfart!

footinmouth.jpg
 

Users who are viewing this thread

Back
Top Bottom