I know I am beating a dead horse here but I need to get it out there.
I have a form that has validation rules, etc, and I want to let the user close it with custom error handling, so I was building a validation procedure for a form close button. The thing is, whether using Isnull, len()=0, or me.field.value = "", it only works until a value is entered. If the user enters a value, the form passes validation, even if the user then backspaces the data out. The only reasonable way to close the form as I see it is to check whether the record has been saved (via recordset), and if it hasn't, advise the user their changes will be lost (msgbox vbyesno), then use the undo command to clear the form making it safe to close it. I feel this is safe because my form validation will cover the save command.
has anyone else done it this way?
I have a form that has validation rules, etc, and I want to let the user close it with custom error handling, so I was building a validation procedure for a form close button. The thing is, whether using Isnull, len()=0, or me.field.value = "", it only works until a value is entered. If the user enters a value, the form passes validation, even if the user then backspaces the data out. The only reasonable way to close the form as I see it is to check whether the record has been saved (via recordset), and if it hasn't, advise the user their changes will be lost (msgbox vbyesno), then use the undo command to clear the form making it safe to close it. I feel this is safe because my form validation will cover the save command.
has anyone else done it this way?