Here's an alternative that may do it rather simply:
1. Make a backup of your table!
2. I have assumed that all names entered into the current Surname field have been entered with a consistant format i.e. Forename then a space then the Surname.
3. Run the following script, replacing YourTable with the name of your table:
var
tcPersons tCursor
CurrSurname String
foreEnd smallint ; this holds the position of the space between
; the Forename and the Surname
srnmLong smallint
RecCount longint
endvar
tcPersons.open("YourTable.db")
tcPersons.edit()
tcPersons.home()
RecCount = 0
scan tcPersons:
CurrSurname = tcPersons.Surname
foreEnd = CurrSurname.search(" ") ; find position of the space between names
tcPersons.Forename = substr(CurrSurname,1,foreEnd-1)
srnmLong = CurrSurname.size() - foreEnd
tcPersons.Surname = substr(CurrSurname,foreEnd+1,srnmLong)
RecCount = RecCount + 1
endScan
tcPersons.endEdit()
tcPersons.close()
msgInfo("Records processed","The number of records processed was "+string(RecCount)+".")
Good luck