Parse Names

QueryStumped

Registered User.
Local time
Today, 17:00
Joined
Mar 22, 2017
Messages
60
Hello, this is QueryStumped from KY. Avid Access user, love it. Not a programmer, but able to create and maintain databases, queries, reports, and macros. Recently stumped on a request, visited several websites/blogs. Need to parse name field. Comes in as LName,FName MI. I need Last Name and First Name. Please advise.
 
basic need is to use the left, mid and instr functions

LName=left(fldname,instr(fldname,",")-1)
FName=left(mid(fldname,instr(fldname,",")+1),instr(mid(fldname,instr(fldname,",")+1)," ")-1)
 
Also...
Code:
dim var1
dim var2
var1 = Split(fldname, ",")
LName = var1(0)
var2 = Split(var(1))
FName = var2(0)
MI = var2(1)
 
Thank you, I will try when I get in the office. Appreciate the help, immensely!!
 
Thank you...I will look at the code too. But I am not well verse in code, as much as, putting the formula within the query itself. But will still look at it. Appreciate all the help. Will let you all know what happens.
 

Users who are viewing this thread

Back
Top Bottom