Please help string parse

ksaab

Registered User.
Local time
Yesterday, 19:47
Joined
Sep 25, 2002
Messages
38
Probably very simple but I cannot get the syntax right - it has been far too long since I used Access.

I am trying to seperate a field NAME from these formats:

LAST/FIRST M
LAST/FIRST

To two fields: Field LAST and field FIRST

Can someone please help?

Thank you! It is Friday and I want to go home!
 
'First' and 'Last' are the names of native functions and, as such, are reserved words as is 'Name'. Best to rename your fields to avoid future problems (I'll use xFirst, xLast and xName to illustrate):

From the debug (immediate) window:
Code:
xName = "LAST/FIRST M"
xLast = left(xName, instr(xname, "/")-1)
? xLast
LAST

xFirst = mid(xName, instr(xName, "/") +1)
? xFirst
FIRST M

HTH - Bob
 

Users who are viewing this thread

Back
Top Bottom