Hi to all,
A user types a name in a subform (family name, First Name).
If the name does not exists (is not in the list), a second form frmNames is opened (with OpenArgs) and the values should be seperated in two text fields: txtFamilyName and txtFirstName.
In formfrmNames, I have:
Code:
strName = Me.OpenArgs
intCommaPos = InStr(strName, ",")
If intCommaPos > o Then ' Value passed in includes a comma
I need to:
1- text before comma to be in Me.txtFamilyName and text after comma in Me.txtFirstName
2- Trim both text boxes to avoid any spaces at the beginning.
3- Use the Ucase function to have only the first letter in capital letter.
How can this be done?
Note:
I have the following code. It has a problem with some special characters like (heinrich böll). It shows like (heinrich b?ll).
Code:
If intCommaPos > 0 Then ' Value passed in includes a comma
Me.txtFamilyName = StrConv(Trim(Left$(strName, intCommaPos - 1)), vbProperCase, 11265)
Me.FirstName = StrConv(Trim(Mid$(strName, intCommaPos + 1, Len(strName))), vbProperCase, 11265)
Any ideas?
Khalil