Results 1 to 1 of 1
2002-11-12, 20:13 #1
- Join Date
- Jan 2001
- Iowa, USA
- Thanked 0 Times in 0 Posts
Conditionally required fields (OL2000, Win2000)
I'm working on a form for users to use to request reports. In one section, I have 2 radio buttons (field name is "NewUpdated", the value of the first button is "New", the second button is "Updated") and a text box (field name is "UpdateToRpt").
I've got the radio buttons set up so that the user is required to select one of them.
What I want to do is have "UpdateToRpt " be a required field ONLY IF the value of NewUpdated is Updated.
I'm getting close, but can't quite seem to sink the shot...
On the Validation tab for NewUpdate (the radio buttons), I have "A value is required for this field" checked.
In "validate this field before closing form" for UpdateToRpt, I have a validation formula of: [NewUpdated]="New"
In "if the validation fails" I have: IIf( [UpdateToRpt] ="" , "You must enter a reason for the Updated Request." , )
This mostly works.
If New is selected, the form processes with or without text in UpdateToRpt...which is correct.
If Updated is selected and there is no text in UpdateToRpt, I get the "you must enter..." message...which is correct.
However, if Updated is selected and there IS text in UpdateToRpt (the falsepart of the IIf formula above) I get a message that says the data in the field is invalid.
I'm missing something here...How should I construct this validation?