You say 'many are named the same'.
Does this mean, then, that not all fields that should have the same data have the same name?
Are the fields at least in the same order?
If neither, then you have a lot of extra work to do.
If the order is the same, then you can do something like:
var
tcR,
tcO tcursor
arRecord array[] anytype
endvar
tc

pen(":alias:work Orders.db")
; locate the appropriate record
if not tcO.qlocate("work_request",value) then
tcO.close()
msgstop("Error","Couldn't locate work request #"+string(value))
return
endif
tcO.copytoarray(arRecord)
tcO.close()
tcR.open(":alias:work request.db")
tcR.edit()
tcR.insertrecord()
tcO.copyfromarray(arRecord)
if not tcO.unlockrecord() then
tcO.canceledit()
tcO.close()
msgstop("Error","Could not copy record")
return
endif
tcO.endedit()
tcO.close()
You can probably also just use copyrecord instead of the copytoarray and copyfromarray; I'm not sure if the field names have to match for that function though.
And the above is if the field order in both tables EXACTLY match; there can't be any fields in EITHER table between the fields that are being copied.
Tony McGuire