Cancelling Form.Load event
Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance
I load some data from the database during the forms load event. If this load
fails, then I need to bring up the error message and abort loading the form.
How do I do this in .NET 2.0? There doesn't seem to be a way of cancelling
the forms construction from within the load event. Also if an error occurs I
don't want a blank form displayed under the error message that then vanishes
after the user clicks OK.
Any help much appreciated...
--
Best regards
Mark
.
Relevant Pages
- Re: Error exiting database
... 'DoCmd.Exit', that would certainly cause errors, as the DoCmd object doesn't ... The error message, though, indicates that the problem is in the Load event ... > The expression On Load you entered as the event property setting produced ... (microsoft.public.access.formscoding) - Re: Error exiting database
... without error if you choose 'Compile ' form the Debug ... > The Load Event looks like this but I don't understand why it would fire ... >> The error message, though, indicates that the problem is in the Load ... >> GlobalSign digital certificate is a forgery and should be deleted without ... (microsoft.public.access.formscoding) - Re: lebans.com/monthcalendar
... needs to be in the form's Load event, which it is as I wrote before. ... > The error message clearly spells out your issue. ... >> The MonthCalendar class instance you passed to this function is INVALID! ... The calendar works on new records. ... (microsoft.public.access.forms) - Re: Using a Combo Box to Find Records
... the form loads? ... The error message comes when the next line of code runs ... Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia ... The load event always runs when a form is opened. ... (microsoft.public.access.forms) - Re: Using a Combo Box to Find Records
... But if I perservere and get past the error message, ... Private Sub cboMoveTo_OnLoad ... The load event always runs when a form is opened. ... Let us know what access put in the immediate window. ... (microsoft.public.access.forms) |
|