Xbasic
OBJECT.NEW_RECORD Function
Syntax
.New_Record([table as c])
Arguments
- table
Character
Description
Adds a new record to a table bound to the layout.
Enters a new record.
The <OBJECT>.NEW_RECORD() method applies to:
- Browses (for <OBJECT> use either the <BROWSE> pointer or the name of the browse)
- Forms (for <OBJECT> use either the <FORM> pointer or the name of the form)
The <OBJECT>.NEW_RECORD() method adds a new record to the table bound to a layout. This is equivalent to using the <TBL>.ENTER_BEGIN() and <TBL>.ENTER_END() methods.
Example
This script adds a new record to the table bound to the Customer form:
:customer.new_record() :customer:last_name.value = "Jones" :customer.commit()
This button on a form adds a new record to the table bound to an embedded browse (named Items ):
parentform:items.new_record() parentform:items.part_no.value = "P100" parentform:items.qty.value = 3 parentform:items.commit()
Limitations
Desktop applications only.
See Also