Romany777 Posted August 18, 2006 Share Posted August 18, 2006 I have two instances that I would like to send to an error handler:1. Select Query returns an empty dynaset - what object/property should I be checking and what should I be checking for?2. I'm inserting images into a form - using OnError if the image file doesn't exist, I can pull in a generic image without any problem - HOWEVER - I would like the module to look in two (or more) places before calling in the generic image. I set OnError to goto a routine that looks for an image in the other place. The first statement in this routine is another OnError to goto the routine to pick up the generic image. If I remember correctly, it hangs in the second routine. What am I doing wrong?Thanks! Link to comment Share on other sites More sharing options...
kdyer Posted November 8, 2006 Share Posted November 8, 2006 (edited) Here is how we do this for #1:If DLookup("[ID]", "Errorlog", "[ID] = 1") Then objEmail.Textbody = "Report Log and Errorlog Attached for Report: " & MailBody 'Message body objEmail.AddAttachment (stFileName) 'Attach Excel File Else objEmail.Textbody = "Update Report Log for: " & MailBody 'Message body End IfFor #2, you can use a IF..ELSE statement with an EXIST?IF object.FileExists("C:\file1.bmp") ThenELSE object.FileExists("C:\temp\file1.bmp")END IFHope this helps.Kent Edited November 9, 2006 by kdyer Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now