I have some vba programming associated with a form in the Form_Open event. It loops through the textbox controls on the form and sets the value equal to something based on certain criteria.
The thing I'm trying to figure out is how to retain that programming when tabbing into a new record. Obviously the form's not opening, or loading, so the event doesn't fire off. What form event should I be looking for? I've included the code below. I've tried putting this into the AfterUpdate event, and it does seem to work, however I can't enter design view when this code is active in that event.
Code:
Dim ctl As Control
Dim i As Integer
For Each ctl In Forms!DynamicDataForm.Controls
If ctl.ControlType = acTextBox Then
If InStr(ctl.Name, "Control") > 0 And ctl.Value <> "Not Used" Then
ctl.Value = ""
End If
Next
Any ideas?
Thanks
DD