Oracle Objects for OLE
Release 8.1.7

Part Number A85257-01

Library

Product

Contents

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.


 
Oracle
Copyright copy; 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents