Skip loading the form 'on error'?

M

Maarkr

Hope this makes sense. I have about twenty forms that link to various other
mdb's and ss's. I made a public function to load the forms in a certain
order when you hit Enter or click a cmdbtn, ie, form 1 closes and opens form
2, etc, named Advance_Click. Runs like a slide show; each slide (form)
displays different benchmark data for management to view daily. Since the
forms link to many sources, I sometimes get an error like 'numeric overflow'
or the network link poops out and gets a #Name, etc. When it works, it works
good. Soooooo, I want to skip any forms that give me errors and advance to
the next form in line (call my Advance_Click). Will putting the function
Advance_Click() in the On Error property of the form work properly (go to the
next form) for most any error and not halt the form load? Any other
recommended method to bypass forms that have load errors? You're probly
thinking I shouldn't have errors, but linking to loads of data all over our
network just isn't perfect every time.
 
J

Jeanette Cunningham

The error property of the form catches data entry errors, so it won't be
very useful for what you are doing.
One thing that comes to mind is to check if the form's recordsource has any
records, perhaps using a DCount on the form's recordsource, and if the count
is 0 you could cancel the opening of that form from its Open event. Others
may have different ideas for you to try.

Jeanette Cunningham
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top