Expr. Box

  • Thread starter Thread starter Jone
  • Start date Start date
J

Jone

Hi ,

What do I write in the expr. box when I want that there "must" be a value in
the field and it "must be between the number 0 and 1" ?
 
What do I write in the expr. box when I want that there "must" be a value in
the field and it "must be between the number 0 and 1" ?

Make the field (which will need to be a Single, Double, Currency or Decimal
number, certainly not the default Long Integer) Required, and in its
validation rule put
= 0 AND <= 1

That's if 0 and 1 are legitimate values; if you want to exclude the limits use
and < instead of >= and <=.

In the ValidationText property put whatever message you want the user to see
if they enter 3.1415926535 or some other unwanted value.

John W. Vinson [MVP]
 
Thanks for your reply!
The problem is that I want that a number MUST be entered in that field and
the expression that you wrote only filters it between 0 and 1, and if I leave
it empty nothing will happen.
 
Did you set the required property of the field, as John suggested?
--
_________

Sean Bailey
 
If the required property is set to true, then the record cannot be saved if
the field contains a null value. If you are able to save the record then the
field is not null, probably a zero length string, so try setting "Allow Zero
Length String" to no.
--
_________

Sean Bailey
 
Hi,
Open the table in design view.
Put the cursor in that field and look down to the bottom of the table, you
should see a tab called general.
There will be a list of properties down the left side starting with
FieldSize for that text field.
One property is called Required
Underneath Required is the property called Allow Zero Length

Jeanette Cunningham
 
It's still not working

Jeanette Cunningham said:
Hi,
Open the table in design view.
Put the cursor in that field and look down to the bottom of the table, you
should see a tab called general.
There will be a list of properties down the left side starting with
FieldSize for that text field.
One property is called Required
Underneath Required is the property called Allow Zero Length

Jeanette Cunningham
 
It's still not working

That's not helpful, Jone.

What are you doing?
What's happening?
What do you WANT to happen?

You may want to modify the validation rule to

IS NOT NULL AND >= 0 AND <= 1


John W. Vinson [MVP]
 
Great It Worked !

John W. Vinson said:
That's not helpful, Jone.

What are you doing?
What's happening?
What do you WANT to happen?

You may want to modify the validation rule to

IS NOT NULL AND >= 0 AND <= 1


John W. Vinson [MVP]
 
Back
Top