M
Martijn
Hi,
My teacher gave me this assignment, make a form with five textboxes, write
an function that looks if the textbox holds some information if so goto the
next textbox, if this textbox doesn't hold any information remember that.
Goto the next textbox to see if it holds information if so place this
information into the textbox that didn't hold any information...and so an.
Anybody have a idea??
I already come up with this code but did only shows whenever a textbox is
empty or not
Sub Check(ByVal ctl As Control)
For Each ctl In Me.Controls
If (TypeOf ctl Is TextBox) Then
If ctl.Text.Length <> 0 Then
MsgBox("This field holds information")
Else
MsgBox("This field is empty")
End If
End If
Next
End Sub
Hopefully someone can help me
My teacher gave me this assignment, make a form with five textboxes, write
an function that looks if the textbox holds some information if so goto the
next textbox, if this textbox doesn't hold any information remember that.
Goto the next textbox to see if it holds information if so place this
information into the textbox that didn't hold any information...and so an.
Anybody have a idea??
I already come up with this code but did only shows whenever a textbox is
empty or not
Sub Check(ByVal ctl As Control)
For Each ctl In Me.Controls
If (TypeOf ctl Is TextBox) Then
If ctl.Text.Length <> 0 Then
MsgBox("This field holds information")
Else
MsgBox("This field is empty")
End If
End If
Next
End Sub
Hopefully someone can help me