limit fields to certain lengths....

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

softspoken

Thread Starter
Joined
Mar 22, 2010
Messages
55
How can you limit fields to certain lengths. For example I have a policy number field that is 10 characters long. I need for it to give an error message or something if they dont key in at least 10 numbers.

Can anyone help?

Thanks

(Access 2003)
 

OBP

Joined
Mar 8, 2005
Messages
19,896
You can place some simple VBA code in the After Update event of that field
if len(me.policynumber) < 10 then
msgbox "Must be 10 Characters in this field
end if
Make sure that where I have policynumber you have the correct name for that field.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top