I have an unbound text box that calculates a range of other text boxes. The unfortunate part is that if one of these text boxes are blank, the calculation doesn't work (correct me if I'm wrong). To get around this, I have defaulted each text box with a 0 and set the conditional format for this value to white so that the form looks better. I am concerned about someone deleting the 0 without knowing it, thus not populating the total. To get around this, I was trying to write code to say if a text box is blank, then populate a 0. To me, this should be pretty easy to write but I can't seem to get it to work. My code is simply:
If Me.Text32 = "" Then
Me.Text32 = "0"
End If
I have tried to add this to AfterUpdate, OnChange, and OnLostFocus with no success. Any ideas?
If Me.Text32 = "" Then
Me.Text32 = "0"
End If
I have tried to add this to AfterUpdate, OnChange, and OnLostFocus with no success. Any ideas?