I have a form with 38 textboxes that will contain number values entered by the user. However, what i want is a simple function that when a user leaves any of the fields blank the function will populate that field with a "0".
I have used this on the textbox onLostFocus event but i do wish to do this 38 times throughout the form.
Private Sub TextVal1_LostFocus()
If Me.TextVal1 = "" Then
Me.TextVal1 = 0
Can anyone suggest a how i put this into a function but keep this function with the form?