text box validation rule trouble

  • Thread starter Thread starter Keith G Hicks
  • Start date Start date
K

Keith G Hicks

I think I've just been staring at this too long. I have 3 text boxes on a
form for 3 credit report numbers. I can't allow them all to be blank. At
least one of them is required. So I'm putting the following into the
"ValidationRule" property of the control (TRW, TU and Eqf are all text boxes
bound to backend fields (jet) of the same name):

Not IsNull([TRW]) And Not IsNull([TU]) And Not IsNull([Eqf])

I've only put it in the TRW control for now just to test. When I have a
value in the TU controol and then delete the value from teh TRW control, my
ValidationText still fires. Clearly not all of them are null. It should
allow me to leave the TRW control after deleting its contents if there is a
value in the TU control.

If anyone can tell me what I'm doing wrong here I'd appreciate it.

Thanks,

Keith
 
No big deal. I decided to handle it in the BeforeUpdate event of each
control. Much easier that way anyhow. But if anyone has any info on why my
other idea wouldn't work, let me know. :)

Keith
 
Keith said:
No big deal. I decided to handle it in the BeforeUpdate event of each
control. Much easier that way anyhow. But if anyone has any info on why my
other idea wouldn't work, let me know. :)


Your logic was wrong, it need OR instead of AND, but I think
that's irrelevant because the validation rule only applies
to the control's bound field and doesn't process an entire
expression that includes a reference to other controls.

The Form's Before Update event is the right place for this
kind of check.
 
Back
Top