By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,841 Members | 1,736 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,841 IT Pros & Developers. It's quick & easy.

Validation Rule / Text

P: 1
I'm having an issue writing this and could use some help. I have no idea what I'm doing here.

Here is the problem:
I need to create a rule that states the GPA is greater than or equal to 0 and less than or equal to 4; also create the validation text.


Please help,

Ronie
Oct 8 '06 #1
Share this Question
Share on Google+
1 Reply


P: 12
I need to create a rule that states the GPA is greater than or equal to 0 and less than or equal to 4; also create the validation text.

You can create a sub-procedure and paste in the following code. Just replace YourControlName to the actual name of your text box:

If IsNumeric(Me![YourControlName]) Then

If Me![YourControlName] < 0 or Me![YourControlName] > 4 Then

MsgBox "Your number is not a valid GPA. Please enter a number between 0 and 4"
Cancel = True

End If

End If


End If
Oct 8 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.