I have a contacts table with field for "Preferred." Many of my contacts are from the same firm, and I want to use this as a way of designating the firm's preferred point of contact.
I have a form that is bound to the contacts table. I want to be able to update the "Preferred" field from this form with a checkbox. To that end, I initially made the "Preferred" field a "yes/no" field. However, I don't want the data in the "Preferred" field to show up as "Yes/No." I'd rather it show up as "P" or blank. To that end, I changed the "Preferred" field to short text, and I made the following event procedure on my Contacts form to update the "Preferred" field with a checkbox.
This almost works. However, instead of updating the field with "P" or null, it updates the field with -1 when checked and 0 when unchecked. My objective is to get it to update to "P" or null.Code:Private Sub PreferredContact_Change()If IsNull(Me!PreferredContact) Then Me.PreferredContact = "P" Else Me.PreferredContact = Null End If End Sub