Trap Default Access Error: Can't load image

  • Thread starter Thread starter Bradley C. Hammerstrom
  • Start date Start date
B

Bradley C. Hammerstrom

A2K,

My form has an image frame. The path and filename are stored in a table
(it's a path to a photo CD).

If the user tries to open the form when the CD is not loaded, I want the
error to be handled with a dialog, "Please insert CD" rather than the user
seeing the default error dialog from Access about how it can't find the
path--a bit technical for the user.

Q: In which event does the error occur? The image frame has no Events. How
can I override, or pre-empt, the standard default Access error dialog and
use my own in it's place? The error dialog pops-up prior to the form
opening.

Brad H.
 
Put code in the form Load event to check that the path exists, something
like:

if len(dir("PathToYourImage")) = 0 then
msgbox "Load the correct CD"
endif




--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 

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

Similar Threads

Error Handling 1
Default Access Errors 4
[Access 2000] Images on Form 6
Import JPEG progress dialog gets stuck 1
Where to trap the error? 9
Linked Image 4
File Dialog in access 2007 1
Image references 1

Back
Top