I use the following coding, and when I select no, cancel or yes, I get the popup box several time before anything is done. Can anyone provide me a way to get the popup box to appear only one time?
Opens messagebox to make sure the user is making the appropriate change
if cancel is selected, no changes are made
If MessageBox.Show("Are you sure you want to update that record?", "Are you sure?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) = DialogResult.Cancel Then
MessageBox.Show("Update has been cancelled!")
End If
if no is selected, no changes are made
If MessageBox.Show("Are you sure you want to update that record?", "Are you sure?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) = DialogResult.No Then
MessageBox.Show("The record was not updated!")
End If
if yes is selected, all updates are made
If MessageBox.Show("Are you sure you want to update that record?", "Are you sure?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) = DialogResult.Yes Then
MessageBox.Show("The record was updated!")
OleDbDataAdapter1.Update(DataSetCompleted1)
End If
Opens messagebox to make sure the user is making the appropriate change
if cancel is selected, no changes are made
If MessageBox.Show("Are you sure you want to update that record?", "Are you sure?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) = DialogResult.Cancel Then
MessageBox.Show("Update has been cancelled!")
End If
if no is selected, no changes are made
If MessageBox.Show("Are you sure you want to update that record?", "Are you sure?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) = DialogResult.No Then
MessageBox.Show("The record was not updated!")
End If
if yes is selected, all updates are made
If MessageBox.Show("Are you sure you want to update that record?", "Are you sure?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) = DialogResult.Yes Then
MessageBox.Show("The record was updated!")
OleDbDataAdapter1.Update(DataSetCompleted1)
End If