Field Data

A

Aurora

I am using Access 2003.
I have a form in which one of the fields ([size2]) should only be completed
when another field ([type]) says "multiple". I want to stop anyone from
entering data into this field unless the the [type] field says "multiple".
In the Table Design, I tried to put a formula in the Default Value that would
protect the [size2] field. I put IIf[Type]="single","N/A"," ") but did
not work. Does anyone have any idea as to how I can make sure that
information into the [size2] field is only entered when the other field says
"multiple"?

Aurora
 
K

Klatuu

First, disable the the [size2] control in the Current event of the form:
Me.size2.Enabled = False

Then in the After Update event of the Type control:

Me.size2.Enabled = Me.Type = "Multiple"
 
Top