Validation Rules

beckie1234

Struggling Student
Local time
Today, 02:48
Joined
Mar 10, 2007
Messages
94
I need to make sure that a user doesn't enter anything but a number in a text box. It is on frmDownTime and the name of the text box is dtDownTime. How would I go about entering this? Using the Properties, Validation??
 
if its bound to a numeric field, only a number can be entered

if its unbound then in the before update event

if not isnumeric(fieldname) then etc
and set cancel = vbcancel

which will prevent the input being accepted
 
It is bound to a field in the tblDownTime and I have it set to a number, yet it will still let me enter text.
Do you think the if statement in the After_Update would force it to use only number entries?
 
i would check it again carefully - if its bound to a numeric field, you wont be able to enter non numeric data, and will get an appropriate warning message "the data yuo have entered is not valid etc"
 
I went to the tblDownTime and made sure that it was set to Number and the area where you enter the general info I have Long Integer, General Number, and 0 decimal places. What else would you suggest I check?
 
it doesn't stop you entering letters instead of numbers.

it just warns you when you try to exit the field

is that what is happening
 

Users who are viewing this thread

Back
Top Bottom