Query syntax

Novice1

Registered User.
Local time
Today, 10:38
Joined
Mar 9, 2004
Messages
385
In a query I'm trying to parse the last name from a full name field. I created a new field, with the following code, which works:

LastName: Mid([FullName],1,InStr([FullName],',')-1)

Instead of having all caps for the field I want proper case (capitalized).

I tried the following code but the error is "wrong number of arguments."

LastName: StrConv(Mid([FullName],1,InStr([FullName],',')-1))

What am I doing wrong?
 
what does FullName look like?
is JOHN DOE or DOE, JOHN? or something else?
 
Could be different versions but always last name followed by comma followed by first name

Doe, John
Doe, John A.
Doe, John AT
Doe, John Kevin
 
LastName: StrConv(Left([FullName], InStr(1, [FullName], ",") - 1), 3)
 
I appreciate it very much. One more question ... please.

I'm having trouble extracting the first name.

FirstName: Mid([FullName],InStr([FullName],",")+1)

This pulls the first name but also the middle initial or middle name. I want to limit the extract to the first name only.
 
See my post to your other question on the same topic.

You are in essence double-posting at the moment. It is misleading to the other forum members when you do that.
 

Users who are viewing this thread

Back
Top Bottom