Validation rule for text

bob786

Registered User.
Local time
Today, 03:44
Joined
Apr 14, 2010
Messages
17
Hello everyone, this is my first thread and post.

Basically i want to limit the character size in a table.

E.G Field name- First name and data type-Text

I want to limit the character size of the first name so the minimum is 4 characters and up to 10 characters max in length.

I been trying to figure it out but no luck.

Any help would be much appreciated.:(:o:o
 
I hope nobody has a short name like "Bob"! ;)

This should work:

Len([FirstName])>3 And Len([FirstName])<11

You could use the Field Size property to define the upper limit.
 
Hi thanks for a quick reply, but it doesnt seem to work, it says the following:

Could not find the field name "FirstName"...?

dont know what is going on, btw im using access 2007..
 
Edit.. OMG IT WORKS argh yay, i needed to leave space between first and name and now it works, thanks.

I have another issue, what if i want to have a rule for only accepting text and not numeric in text data type? is that possible..?
 
By the way, welcome to the site!
 
Thanks pbaldy, the link works like a charm, it is very useful. thanks once again.
 
No problemo. You'll find a lot of good info on Allen's site.
 
Do you a validation rule that only allows you to input a text OR a numeric in one field. such as house name/ number, but not both...
 
If I understand correctly, combining Allen's appears to work:

Is Null Or Not Like "*[!a-z]*" Or Not Like "*[!0-9]*"

That let's me do all letters or all numbers, but no combinations.
 
Thanks it does work, I tried Allens E-mail rule and it works really well. Must thank you as you helped me alot in fews mins.
 
Happy to help; good luck on the project.
 

Users who are viewing this thread

Back
Top Bottom