In the Add event procedure, we perform the following steps:
Blank out the fields on the form.
Disable the Add button
Enable the Commit button
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.