Yes / No

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi.

I have a "Yes / No" field in my table - when this field appears on my form
it shows as a square box. When you click on it is puts a check mark in the
box - which means "yes". How do I make this a required field ?

Thanks !

Ty
 
I just realized my question is wrong. What I meant to say is if they
populate another field then the "YES or NO" field must be field out. So the
question is how can I make it so Access checks to see if a field is empty or
not and if it is NOT empty then make them fill out the YES or NO field.

Thanks again !!!!!!!

Ty
 
I just realized my question is wrong. What I meant to say is if they
populate another field then the "YES or NO" field must be field out. So the
question is how can I make it so Access checks to see if a field is empty or
not and if it is NOT empty then make them fill out the YES or NO field.

Use the Form's BeforeUpdate event to check for this type of
cross-field validation:

Private Sub Form_BeforeUpdate(Cancel as Integer)
If IsNull(Me!TheCheckBox) AND NOT IsNull(Me!TheOtherTextBox) Then
MsgBox "Please check or uncheck the checkbox", vbOKOnly
Cancel = True
End If
End Sub

Though this is a bit odd - a Yes/No field has only two values, Yes and
No; if you don't check it it fills in No. Are you certain this is
working like you expect?

John W. Vinson[MVP]
 
Back
Top