J
Jack
Hi,
I have the following code in got focus of a text box.
If ChannelOutput(strGetplantname1) = "A" Then
If (txtContPlan1.Text) <> "" Or Not (IsNull(txtContPlan1.Text)) Then
txtContPlan1.Locked = True
txtContPlan1.BackColor = vbYellow
Else
txtContPlan1.Locked = False
End If
ElseIf ChannelOutput(strGetplantname1) = "B" Then
'Do nothing
Else
If (txtContPlan1.Text) <> "" Or Not (IsNull(txtContPlan1.Text)) Then
txtContPlan1.Locked = True
txtContPlan1.BackColor = vbYellow
Else
txtContPlan1.Locked = False
End If
End If
Now I have to use the same kind of formula but to thirty other text boxes in
the same form.
This can be done by cutting and pasting and renaming etc. However i was
wondering if this can
be turned into a function that can be called at each event of the got focus
of the text box concerned.
Also the Channel is calculated field. So how does it play out in a function
here.
I would appreciate any help for resolution of this issue. Thanks.
I have the following code in got focus of a text box.
If ChannelOutput(strGetplantname1) = "A" Then
If (txtContPlan1.Text) <> "" Or Not (IsNull(txtContPlan1.Text)) Then
txtContPlan1.Locked = True
txtContPlan1.BackColor = vbYellow
Else
txtContPlan1.Locked = False
End If
ElseIf ChannelOutput(strGetplantname1) = "B" Then
'Do nothing
Else
If (txtContPlan1.Text) <> "" Or Not (IsNull(txtContPlan1.Text)) Then
txtContPlan1.Locked = True
txtContPlan1.BackColor = vbYellow
Else
txtContPlan1.Locked = False
End If
End If
Now I have to use the same kind of formula but to thirty other text boxes in
the same form.
This can be done by cutting and pasting and renaming etc. However i was
wondering if this can
be turned into a function that can be called at each event of the got focus
of the text box concerned.
Also the Channel is calculated field. So how does it play out in a function
here.
I would appreciate any help for resolution of this issue. Thanks.