I would think it simple, but just haven't quite come accross the appropriate function(s) for this operation. Here is some psudocode for what I am trying to do:
Basically, if there is a "-" in the string, then I want to split the two values, setting one text box equal to the second value, and the original text box equal to the first half of the string.
Any ideas?
Stephen
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV
Code:
Private Sub txtDNUM_AfterUpdate()
If txtDNUM has "-" in it, then
txtDesk# = string after "-"
txtDNUM = string before "-"
txtName.SetFocus
End If
End Sub
Basically, if there is a "-" in the string, then I want to split the two values, setting one text box equal to the second value, and the original text box equal to the first half of the string.
Any ideas?
Stephen
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV