Takes two parameters, TableName and a boolean expression
Description:
There must be one Field in the Work Query named TableName.Alias; such as if deleting Records in the MemTab.Person table, there must be a MemTab.Person.Alias Field in the Work Query.
The value of the .Alias Field in the WorkQuery must match the Alias of the Record in the Database Table to be deleted. If the value of the .Alias Field in the WorkQuery is blank it will be skipped without error.
If the Work Query field Error does not already exist when this command is run, it will be created. For any errors that occur per record, the error message for each record will be placed in the Error field.
Usage:
TableName, IfLenFld
TableName, [""]
[WorkWith], [""]
TableName, [WorkIf]
[WorkWith], [WorkIf]
Example:
WorkWith "ToDo.Item"
SetNew "Alias", pItem
Delete
FailIfRecError
End WorkWith