I'm currently trying to work out a strategy for dealing with user-defined error messages occurring inside a user control, and I'm looking for advice.
Crin, since BirdsOfFire1 gave me what probably should be your points, I will offer this to you, although other experts with wwrthy ideas will also get points.
The idea is this:
I have a user control with a combobox and a command button entitled add.
The combobox lists item-IDs in a database, and when the user clicks Add, a new form appears that lets the user add a new record.
Since the database is not random-access, the user must define the ID.
If the ID is a duplicate, I intercept it during the add process and indicate that I will be appending a digit to make it unique.
Recently, I was told that I should offer the user the option to replace the existing record, ignore the add, or insert a new record.
Since the ID verification process is occurring inside the function that checks the ID and returns a new-unqiue-ID, what's the best way to pass back a message to the calling routine(s) so that these routines can figure out how to handle this situation?