Beruflich Dokumente
Kultur Dokumente
Call EnableNavigation
'The user should have freedom to move now.
cmdEdit.Enabled = True
cmdDelete.Enabled = True
'Added later to provide more security.
mblnAddMode = False
'We are no longer in addmode.
txtFirstName.Locked = True
txtLastName.Locked = True
txtTitle.Locked = True
'Allow the user to enter items into the text boxes.
If cmdCloseConnection.Enabled = True Then
'Make sure that the database connection is
'open before you try to add data back to
'the controls.
Call LoadDataInControls
'reload the data.
End If
End If
End Sub
'***********
'*17th Step*
'***********
Private Sub WriteDataFromControls()
rsRecordSet.Update
'No data is saved until the update method is executed.
mblnAddMode = False
'Saving closes add mode.
cmdSave.Enabled = False
'Save does not need to be enabled after the save is executed.
If cmdAdd.Caption = "&Cancel" Then
cmdAdd.Caption = "&Add"
End If