>Good Morning,
>
>I have been requested to add a "copy" functionality to an app. Basically, the user should be able to locate the correct record, press a cmdButton and have a duplicate of the current record added and presented for slight modification.
>
>I have no trouble getting them to the record to be copied. I'm not sure how to copy the record and make sure that I end up on the copy.
>
>My inital thought is....lock the screen (so the user doesn't see any change or movement on the input form), copy each field from the current record to a cursor, append a blank, move to the appended record, paste the fields, and then unlock the screen so the user can make the change, or cancel.
>
>Ideas from those who have BTDT would be greatly appreciated.
>
>TIA,
Instead of a cursor, it is easier to work with SCATTER and GATHER, something like this:
local loRecord
scatter name loRecord
append blank
gather name loRecord
Each field becomes a property of loRecord.
Insert your additional commands, like locking and unlocking the screen. You can modify the values of the loRecord properties before gathering. See also the recent FAQ, about adding custom properties to this kind of object.
HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)