use a function.....
code is made up on the fly so it will need debugging
public function TartUpName(AName as string) as string
'This function is designed to split a supplied name based on a comma delimited list. it only works with 2 components (eg "Janus, Hugh")
'it will rebuild the incoming parameter by transposing the two terms separated by a comma
'the function could be generalised to handle a different separation character
'it will have a problem with names supplied with two or more commas.. the function can be extended to handle that if desired
AName=strconv(aName, vbProperCase) 'convert the incoming name to Proper Case eg JANUS, HUGH becomes Janus Hugh
if isnull(aName) or strlen(aName<1) then 'test if we've been sent crap data
Dim Names() as string 'this will receive the output of the split function
Names=split(AName,", ") 'break apart the incoming name into 2 or more elements based on the comma
'Do we need to be cute and handle special cases like MacDonald, O'Connor etc?
'for now lets assume not.....
'rebuild the name
'so Janus, Hugh becomes Hugh Janus
TartUpName=names(1) & " " & names(0)
Got to agree with GeorgeV though... it would be far better to handle this at source
I'd rather be riding on the Tiger 800 or the Norton