Autofill yes/no field on form

QueryStumped

Registered User.
Local time
Today, 08:53
Joined
Mar 22, 2017
Messages
66
Hello...i have a form that needs to be programmed to fill a yes/no field automatically by a selection made from a combo box of another field. If nothing is chosen, then the yes/no field will remain empty. Would like to put the programming statement in the design view control source in the yes/no field of the form. Please advise.
 
Yes/no fields (boolean) only have 2 choices...yes, no.

If you use a combo box,with the words: 'yes','no'
THEN you can have a null.
 
Thank you. What if I choose a selection from the combo box field, titled school, selecting Eastern High. How can I have another field, check box, to show automatically a checkmark?
 
If the checkbox is entirely dependent on the state of combobox then the checkbox value should not be stored in the table but determined by testing the School field for null.

Otherwise, test the combo and use the result to set the checkbox.

Code:
Private Sub cmbSchool_AfterUpdate
 
    Me.chkWhatever = Not IsNull(Me.cmbSchool)
 
End Sub
 
Ok cool, Thank you. Will try once I get into the office. Really appreciate everyone's help.
 

Users who are viewing this thread

Back
Top Bottom