2 field validation

teiben

Registered User.
Local time
Today, 08:02
Joined
Jun 20, 2002
Messages
462
I'm doing something wrong, as this isn't working for me.

I have 2 fields on a continuous subform Quanity and Defect_description, if a Quanity of larger than one is entered then a Defect_description must be selected. Defect_description is a combo box.

I put this on the before update of the Defect_description

if [quantity] >0 then Defect_description notnull
msgbox "you entered a quanity - now select a defect description", vbinformation, "Message"
Defect_description.set focus
else
end if
end sub

Please help.....
 
You need to put your code in the BeforeUpdate event of the FORM and not the ComboBox. Your code has some problems too but I'll bet you can fix those once you are in the right event.
 

Users who are viewing this thread

Back
Top Bottom