That noted, where you use the Validation Rule sometimes is a matter of
preference; other times, it's a matter of where it's easier to
write/test/handle the validation. If you put the Validation Rule in the
table, ACCESS will generate an error message that may or may not be
meaningful to your user; a similar situation occurs if you use the
Validation Rule for a control on a form. If you want to control the message
that is displayed, you need to use the Form's Error event to trap the
specific error for the specific control and substitute your own message. Or
use the control's AfterUpdate or BeforeUpdate event (or the form's
BeforeUpdate event) to capture the error.
A validation rule that says you must have a letter and number (assuming
either can be "first" in the string's contents):
Like "*[0-9]*[a-z]" Or Like "*[a-z]*[0-9]*"
--
Ken Snell
<MS ACCESS MVP>
"kishan" <kis...@discussions.microsoft.com> wrote in message
news:41ADA695-29F1-409E...@microsoft.com...
> Hi, i have a table where passwords are kept and i need a vaidation rule
> that
> means the password must have at least one letter and one number. Also woud
> it
> be easier to have the coding on a form or in the validation option in the
> table design (i would prefer not to have a form for this table so can the
> coding go in the validation rule box in the table design).
>
> thanks
> kishan
There is a matching 'Validation Text' property.
('The error message that appears when you enter a value prohibited by the
validation rule')
(david)
"Ken Snell [MVP]" <kthsne...@ncoomcastt.renaetl> wrote in message
news:uSKfCCCS...@TK2MSFTNGP14.phx.gbl...
Thanks, david.
--
Ken Snell
<MS ACCESS MVP>
"david epsom dot com dot au" <david@epsomdotcomdotau> wrote in message
news:OkVYeQUS...@TK2MSFTNGP14.phx.gbl...