Skip Headers

Oracle® Objects for OLE Developer's Guide
10g Release 1 (10.1)

Part Number B10118-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Feedback

Coding the Add Button

See Also
Quick Tour
Employee Form

In the Add event procedure, we perform the following steps:
  1. Blank out the fields on the form.
  2. Disable the Add button
  3. Enable the Commit button
  4. Let the user enter new field values
The Add event procedure looks like:

Private Sub AddNew_Click()

'Blank out the fields

txtEmpno = ""

txtEname = ""

txtJob = ""

txtMgr = ""

txtHireDate = ""

txtSal = ""

txtComm = ""

txtDeptno = ""

'Disable the Add button and enable the commit button

AddNew.Enabled = False

Commit.Enabled = True

End Sub

When AddNew_Click() exits, control returns to the Employee form where the user enters field values in the text boxes.