Settings for a minimum number of character

G

GillesABelanger

In this case, I need to have 6 characters to identify a produt code. Not 5,
not 7, but 6.

In the table design I already set the field size to 6 maximum. Then, I
cannot save any record longer than 6 characters long.

But then, how can I warn the user if only 5 characters are entered?

This is a data access page. I may try to write vbscript coding for that
purpose, but I do not know the code yet!
Thanks
 
J

John Nurick

Hi Gilles,

Use this as the field's Validation Rule:

Like "??????" Or Is Null

If a product code is not just 6 characters but (e.g.) 6 alphanumeric
characters, use something like

Like "[0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z]" Or Is Null

To make it obligatory to enter a code, omit the
Or Is Null
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top