Connecting Tech Pros Worldwide Help | Site Map

Required Field

kufre
Guest
 
Posts: n/a
#1: Nov 13 '05
I want to make some field required if a condition is true. Example, If
txtSubNumber is equal to 2 or greater, I want
txtOriginalSubmissionDate to be required.

pietlinden@hotmail.com
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Required Field


You can only do that in a form. One way to do it would be to use the
AfterUpdate (I think) event of txtSubNumber and in it to set the focus
on txtOriginalSubmissionDate and then don't let the user off the field
unless a valid date is entered.

Mark
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Required Field


Open the table in design view and view the table properties.
In the validation rule of the table enter something like:
IIf([field1]>=2,[field2] Is Not Null)
Then in the validation text property, something like:
"You need to enter a value"

Make sure the default value of field2 is set to null.

If you then enter a value in field1 greater or equal to 2 and try to move
onto another record, a message will appear informing you that a value needs
to be entered into field2.

Mark

"kufre" <kufreanaka@yahoo.com> wrote in message
news:1112045232.012939.169700@f14g2000cwb.googlegr oups.com...
I want to make some field required if a condition is true. Example, If
txtSubNumber is equal to 2 or greater, I want
txtOriginalSubmissionDate to be required.


Closed Thread