Oracle® Objects for OLE Developer's Guide 10g Release 1 (10.1) Part Number B10118-01 |
|
See Also |
Quick Tour |
Employee Form |
We set the DoUpdate boolean to TRUE, so the commit procedure knows we are updating and not adding a record.
The Update event procedure does the following:
Private Sub cmdUpdate_Click()
'Disable the Update button and enable the commit button
cmdUpdate.Enabled = False
Commit.Enabled = True
'Disable all other buttons
DisableNavButtons
txtEmpno.Enabled = False
DoUpdate = True
End Sub
The Update and Add event procedures call the DisableNavButtons() subroutine to disable navigation and other functions during an add or update.
Private Sub DisableNavButtons()
'disable all buttons while adding and updating
cmdFirst.Enabled = False
cmdPrevious.Enabled = False
cmdNext.Enabled = False
cmdLast.Enabled = False
cmdFind.Enabled = False
cmdUpdate.Enabled = False
AddNew.Enabled = False
End Sub