deleterecord

The deleterecord statement deletes the currently selected record.


Parameters

No parameters.


Description

This statement removes the entire active record from the database. After deleting the record, all other records below the current record move up one row in the data sheet window and the cursor will reside on the next visible record immediately following the deleted record. On a single record view form, the display will change to the next visible record after the deleted record.

This statement will delete the currently active record unless there is only one record selected. You can never delete the last visible record from any Panorama database.

This simple example will remove the active record from the database.

deleterecord

This example checks all selected records in the Stock database one by one and deletes a record when the Status field contains the word old for that record. It then pastes the deleted record into the Old Stock database. If only one record remains in Stock and it is an old record the procedure will warn you that you cannot delete it.

firstrecord
loop
    if Status contains "old"
        if info("selected") = 1
            beep
            message "You cannot delete the last record."
            stop
        else
            copyrecord
            deleterecord
            window "Old Stock"
            pasterecord
            window "Stock"
         endif
     endif
     downrecord
 until info("stopped")

See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but no longer copies to the clipboard.