lunargirrl
Programmer
Hello,
I had a problem constructing this code and some friends from this forum helped me
I'm still thankful for that!
The objective is to generate userId's taking the first character of the user's first name and the whole last name.
The problem now:
e.G. Marianne Peterson
Mariah Peterson
my code generates mpeterson01 for both.
How can implement my code that if mpeterson01 already exists in my db, it generates a second one: mpeterson02??
I tryed to make that but I dont have a clue how to threat the 01, 02, etc.
**************************************************
StringArray = Me.txtName.Text.Split(" ")
strName = StringArray(StringArray.Length - 1)
Dim strResult As String
strResult = Left(txt_Name.Text, 1) & strName & "01"
***************************************************
tia,
Gis.
I had a problem constructing this code and some friends from this forum helped me
The objective is to generate userId's taking the first character of the user's first name and the whole last name.
The problem now:
e.G. Marianne Peterson
Mariah Peterson
my code generates mpeterson01 for both.
How can implement my code that if mpeterson01 already exists in my db, it generates a second one: mpeterson02??
I tryed to make that but I dont have a clue how to threat the 01, 02, etc.
**************************************************
StringArray = Me.txtName.Text.Split(" ")
strName = StringArray(StringArray.Length - 1)
Dim strResult As String
strResult = Left(txt_Name.Text, 1) & strName & "01"
***************************************************
tia,
Gis.