To create a new record, if you can relate the two tables with a relationship where you can enable "Allow creation of related records via this relationship", then the new record can be created automatically.
To copy the data, use the set field just as you would for a table that's part of the file.
Set Field[Remotetablename::fieldname, localtablename::fieldname]
Repeat for each value.
If you can't use a relationship, Create a layout that refers to the remote table.
Set Variable [$fld1, localtablename::field1]
Set Variable [4fld2, localtablename::field2]
Go To Layout [Remote table layout]
Set Field [RemoteTable::Field1, $fld1]
Other methods may work better depending on your tables, layouts and what you want to accomplish.
If the two tables are identical, Import Records might also be used.
The usual correct response is ... you shouldn't need to. The purpose of relational databases is that you don't need to copy data from one table to another but rather you just relate them. If you are needing to copy data from one table to another, I would question the purpose. We might be able to save you some work (not to mention file size and time) if you wished to share more specifics about what the tables represent. :smileyhappy:
Thanks just what i was looking!! :)