Error Correction in reports

bjreb

Registered User.
Local time
Today, 04:58
Joined
May 7, 2001
Messages
37
Hi-
I am using the following code to place images into reports and formsFunction

setImagePath()
On Error Resume Next
strImagePath = Me.txtimagename
Me.Imageframe.Picture = strImagePath
End Function

Is there a way to to not have a record show if the imagepath do not refrence an acutal file.
EX strImagepath = Bob.JPG
but Bob.jpg does not exist so I dont want the record to show.

Thanks
Andy
 
Maybe there is a solution on the page of the graphic wizard at www.unsoftwareag.com.
Otherwise I could only imagine to check with the DIR function whether the file exists and to make the image control invisible if necessary. But I fear that this will slow down the report (depending on the number of files to check). Second problem is that this code would be executed twice if the report is first previewed and then printed.
 

Users who are viewing this thread

Back
Top Bottom