I was actually trying to head in a different direction.
I want to leave the list enabled no matter what the current mode is.
Basically I allow all users to browse records in a view-only mode. As they
navigate the listbox the details of the current record are displayed in a
richtext box. If the user has the correct permissions the can select Edit
and the richtext is hidden, edit fields appear populated for editing, and I
set a Boolean IsEditing = true. From this point if the user attempts to
navigate away from the current record, close the form, or close the
application the current record is checked to see if they have changed it.
If they have changed it, they are prompted to Save, Abandon changes, or
Cancel to return to the current record for further editing. If they choose
Cancel, or the save fails, they are returned to the record for further
editing.
This means I have to reposition within the listbox to the one they were on
when they attempted to leave it. What I was hoping for is the ability to
something similar to the Cancel on a form closure to automatically return to
the listbox item it was on prior to the move. I assume though that I will
have to do it programmatically to reposition based on the item index or the
Value property within the list of objects in the listbox.
"""Jeffrey Tan[MSFT]""" <v-*****@online.microsoft.com> wrote in message
news:Qd**************@cpmsftngxa06.phx.gbl...
Hi Byron,
Does my solution resolve your issue?
If you still have anything unclear, please feel free to post, I will help
you.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.