Subform error handling

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello.
I have a form with two linked subforms (which one in a separated tab). When
I try to select a tab with a subform, it appears a message saying that I
didn't filled some needed fields. I know that I have to fill up that field,
but how can I replace those messages by my own? I would like to translate it
with a more user friendly explanation... I don't know if I was quite clear...
Hope so!
Thank you in advance.
 
Hi Acores

You can intercept any recordset errors in you Form_Error event procedure
(see here:
http://msdn.microsoft.com/library/en-us/vbaac11/html/acevtError_HV05187210.asp)

However, you will probably find it easier to use the Form_BeforeUpdate event
procedure. That way you can check the validity of the record's contents
BEFORE the form attempts to save the record. This provides more flexibility
and makes it easier to customise messages and give the user choices about
what action to take.
 
Back
Top