I am making a staff form, it has firstname, lastname and a quickname field
What I am trying to do is to make a suggestion for a quickname \ callsign by taking the first character of the first name, a "." then the last name.
Trying to use Left and Len with out much success. I had it working at one stage but Len does not count a " " as a character and that just threw it all off.
now it only works with one or 2 characters, does not return anything with 3 chars and errors on 4 or above "Invalid procedure or call argument"
Don't mean to spam the forums, I generally get one day in a blue moon to work on a database so I'm trying to make the most of it.
What I am trying to do is to make a suggestion for a quickname \ callsign by taking the first character of the first name, a "." then the last name.
Trying to use Left and Len with out much success. I had it working at one stage but Len does not count a " " as a character and that just threw it all off.
Code:
Dim strFNametxt As String
strFNametxt = Me.txtFirstName
Dim intFName As Integer
intFName = Len(strFNametxt) - 3
Dim strStuff As String
strStuff = Left(strFNametxt, InStr(1, strFNametxt, " ", vbTextCompare) - intFName)
Me.txtQuickName = strStuff
now it only works with one or 2 characters, does not return anything with 3 chars and errors on 4 or above "Invalid procedure or call argument"
Don't mean to spam the forums, I generally get one day in a blue moon to work on a database so I'm trying to make the most of it.