Clearing Form, unbound text boxes

ResTech

Registered User.
Local time
Yesterday, 18:33
Joined
Jun 20, 2013
Messages
29
I have a form that has some unbound text boxes in it, when I switch to a new record I want the unbound text boxes to clear.
 
One way, using the Tag property:

Code:
  Dim ctl                As Control

  For Each ctl In Me.Controls    'Only check data entry type controls.
    Select Case ctl.ControlType
      Case acTextBox, acComboBox
        If ctl.Tag = "Clear" Then
          ctl = Null
        End If
    End Select
  Next ctl
 
I was hoping to use expression builder or a macro to do this, is using code a must? I'm horrible when it comes to programming.
 
Sure, you can use a macro to set each control one by one.
 
It's either SetValue or SetProperty as I recall.
 
Thanks so much, I will try that.:banghead:
 

Users who are viewing this thread

Back
Top Bottom