View Full Version : validation


JulieAsking
01-31-2002, 05:51 PM
I have a text box named Side in my subform. I have a validation rule "L" or "R" or "Null" attached to this field.

My aim is to force users to only enter L or R, but I also want the option of closing the subform without having to make an entry in the Side field. On this account I tried adding "Null" ( as "L" or "R" or "Null")to the validation but this still does now allow me to close an uncompleted subform.

I would prefer to stick with a text box (versus a list box or option group) as Side needs to reside on a subform which is set on Continuous and a text box takes up the least space.

Is there a way Access97 will let me close an uncompleted subform but still insist on L or R if such an entry is required in the Side field?

Thanks for any help

Julie

Fizzio
02-01-2002, 01:18 AM
Why not use a combo box? In the rowsource type, set it to value list. in the rowsource, type ;L;R. This then gives you 3 options, Null, L and R and does not display an error message if an invorrect entry is made. It will take up no more room than a textbox also.

HTH

Pat Hartman
02-01-2002, 05:12 AM
Is the field specified as required in the table definition?

JulieAsking
02-01-2002, 05:23 PM
Thank you both Fizzio and Pat.

I used your method Fizzio with perfect results. Didn't know you could do that. Thanks so much.

Julie