[AccessD] Creating default false in yes/no field

Bill Benson bensonforums at gmail.com
Fri Aug 1 20:31:54 CDT 2014


I don't follow this thread completely, but in my recent project I have a
yes/no field in the database called Inactive, whose default is 0. How I
maintain that on the form is that I drag that field onto the form, and make
it invisible. I then have an Option Group (Frame) control with two Option
Buttons:  
	Control		Value
	optActive	1
	optInactive	2

On Current, I populate the controls as:

Private Sub Form_Current()
If InActive = False Then
    frStatus = 1
Else
    frStatus = 2
End If
End Sub

And when the controls are updated I populate the field as:

Private Sub frStatus_AfterUpdate()
	InActive = IIf(frStatus.Value = 1, False, True)
End Sub

If this is unrelated to what you are dealing with, I apologize.



More information about the AccessD mailing list