R ResTech Registered User. Local time Yesterday, 18:33 Joined Jun 20, 2013 Messages 29 Jul 2, 2013 #1 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.
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.
pbaldy Wino Moderator Staff member Local time Yesterday, 16:33 Joined Aug 30, 2003 Messages 36,272 Jul 2, 2013 #2 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
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
R ResTech Registered User. Local time Yesterday, 18:33 Joined Jun 20, 2013 Messages 29 Jul 2, 2013 #3 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.
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.
pbaldy Wino Moderator Staff member Local time Yesterday, 16:33 Joined Aug 30, 2003 Messages 36,272 Jul 2, 2013 #4 Sure, you can use a macro to set each control one by one.
R ResTech Registered User. Local time Yesterday, 18:33 Joined Jun 20, 2013 Messages 29 Jul 2, 2013 #5 I can't even figure that out.
pbaldy Wino Moderator Staff member Local time Yesterday, 16:33 Joined Aug 30, 2003 Messages 36,272 Jul 2, 2013 #6 It's either SetValue or SetProperty as I recall.
R ResTech Registered User. Local time Yesterday, 18:33 Joined Jun 20, 2013 Messages 29 Jul 2, 2013 #7 Thanks so much, I will try that.:banghead:
pbaldy Wino Moderator Staff member Local time Yesterday, 16:33 Joined Aug 30, 2003 Messages 36,272 Jul 2, 2013 #8 No problem.