I
ILCSP
Hello, I have a typical form with some command buttons- New, Save,
Reset, Update, Exit, Delete, etc. and some of them like Save, Delete
and Update have a vbYesNo question that asks the user whether to carry
on with the action (i.e. "Do you want to Update this record?" Yes - No)
and they work as they should: if the user click Yes the record gets
updated, otherwise, it does not.
However, when I check for changes for the current record (before
creating a new record or exiting the form) I also let the user know
whether the current record was modified, but not saved and I ask.. Do
you want to save it? Yes - No. If they click the vbYes button, then
they're directed to the Update button's code (Update_Click) which has
its own question as stated in the first paragraph of this post.
Therefore, the user gets the update question and has to click Yes again
to update and that can be pretty annoying for them.
Is there a way to GOTO a specific part of the code in the Update
command button so they don't have to see its own question?
This is part of the update button code:
Private Sub Update_Click ()
' Get confirmation
strMsg = "Do you want to Update this record?"
If MsgBox(strMsg, vbYesNo + vbQuestion + vbDefaultButton2, "Delete
Record?") = vbYes Then
(X) I want the GOTO connector to start from here!
Upd:
..and here I call the store procedure that updates the record
End If
End Sub
________________________________
What I want to do is that when I'm checking for changes and I ask the
user if they want to update and they agree, I should go directly to the
part of the code in the update button where I call the store procedure.
I want to skip the Update question to update because the user already
confirmed their updating intentions.
I know this is probably a very easy line like 'GoTo Update_Click
something Upd:'
Again, thanks for all your help.
Max
Reset, Update, Exit, Delete, etc. and some of them like Save, Delete
and Update have a vbYesNo question that asks the user whether to carry
on with the action (i.e. "Do you want to Update this record?" Yes - No)
and they work as they should: if the user click Yes the record gets
updated, otherwise, it does not.
However, when I check for changes for the current record (before
creating a new record or exiting the form) I also let the user know
whether the current record was modified, but not saved and I ask.. Do
you want to save it? Yes - No. If they click the vbYes button, then
they're directed to the Update button's code (Update_Click) which has
its own question as stated in the first paragraph of this post.
Therefore, the user gets the update question and has to click Yes again
to update and that can be pretty annoying for them.
Is there a way to GOTO a specific part of the code in the Update
command button so they don't have to see its own question?
This is part of the update button code:
Private Sub Update_Click ()
' Get confirmation
strMsg = "Do you want to Update this record?"
If MsgBox(strMsg, vbYesNo + vbQuestion + vbDefaultButton2, "Delete
Record?") = vbYes Then
(X) I want the GOTO connector to start from here!
Upd:
..and here I call the store procedure that updates the record
End If
End Sub
________________________________
What I want to do is that when I'm checking for changes and I ask the
user if they want to update and they agree, I should go directly to the
part of the code in the update button where I call the store procedure.
I want to skip the Update question to update because the user already
confirmed their updating intentions.
I know this is probably a very easy line like 'GoTo Update_Click
something Upd:'
Again, thanks for all your help.
Max