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

Validation Rule

P: n/a
Hello

In a text box, I would like the user to be able to enter only a number from
0 to 100 (including decimals Ex: 24.56) so I wrote this in the Validation
Rule Propertie
of the text box : >= 0 And <=100

This works good when the user enters numbers in the text box but when
letters are entered
Access displayed a default message instead of the Validation Text message.

How would I write the Validation Rule so the exclude all letters and include
all numbers from 0 to 100
including decimals?

I am using MSAccess 2000

Thanks
G.Gerard
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Wed, 20 Apr 2005 11:23:42 GMT, "GGerard" <gg*****@nbnet.nb.ca>
wrote:

Take a look at the InputMask property. You could use it to force the
user to enter digits only.

-Tom.
Hello

In a text box, I would like the user to be able to enter only a number from
0 to 100 (including decimals Ex: 24.56) so I wrote this in the Validation
Rule Propertie
of the text box : >= 0 And <=100

This works good when the user enters numbers in the text box but when
letters are entered
Access displayed a default message instead of the Validation Text message.

How would I write the Validation Rule so the exclude all letters and include
all numbers from 0 to 100
including decimals?

I am using MSAccess 2000

Thanks
G.Gerard


Nov 13 '05 #2

P: n/a
Tom,
True. Though if you want control over the message that is displayed a bit
of code in the form of a validation function which displays a message in a
message box might be a better way to go.
--
Alan Webb
kn*******@SPAMhotmail.com
"It's not IT, it's IS"

"Tom van Stiphout" <no*************@cox.net> wrote in message
news:ra********************************@4ax.com...
On Wed, 20 Apr 2005 11:23:42 GMT, "GGerard" <gg*****@nbnet.nb.ca>
wrote:

Take a look at the InputMask property. You could use it to force the
user to enter digits only.

-Tom.
Hello

In a text box, I would like the user to be able to enter only a number
from
0 to 100 (including decimals Ex: 24.56) so I wrote this in the Validation
Rule Propertie
of the text box : >= 0 And <=100

This works good when the user enters numbers in the text box but when
letters are entered
Access displayed a default message instead of the Validation Text message.

How would I write the Validation Rule so the exclude all letters and
include
all numbers from 0 to 100
including decimals?

I am using MSAccess 2000

Thanks
G.Gerard

Nov 13 '05 #3

P: n/a
On Wed, 20 Apr 2005 10:53:29 -0400, "Alan Webb"
<kn*******@hotSPAMmail.com> wrote:

Alan,
True. :-)
Personally I never use the validation property, but would write my
validation code in VBA in the <control>_BeforeUpdate event.

-Tom.

Tom,
True. Though if you want control over the message that is displayed a bit
of code in the form of a validation function which displays a message in a
message box might be a better way to go.


Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.