Hi all,
I have very little progamming experience with Access. I have field "User" which is filled with "firstname" and "lastname" (format looks like: firstname.username). Next I have second field "Nickname". I would like to fill "Nickname" automatically when I go to next record. Nickname contains 6 characters (all uppercase). Format of Nickname is: first character from "firstname" and first five characters from "lastname" (behind dot).For example:
For example:
1st user
Field User: Peter.Smith
Field Nickname: PSMITH
2nd user
Field User: Thomas.Sikoooo
Field Nickname: TSIKOO
3rd user
...
etc.
I have this query, which work correct for me, but I do not want to run an update query.
Code:
UPDATE Table1 SET Table1.NickName = UCase(Left(Left([User],InStr(1,[User],".")-1),1) & Left(Right([User],Len([User])-InStr(1,[User],".")),5));
How I can convert this query to VBA code. I want, than update was automatically executing, when I'm going to next record in form. Necessary condition to run code: Field "user" must be filled!
Many thanks!