Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

image on report problem 1

Status
Not open for further replies.

Tom123456

Programmer
Apr 2, 2003
70
SE
Hello I have an image in the top lefcorner of my report. In a "settings" table I have a column that contain a path to an alternative image.

THIS IS THE CODE THAT SHOWS THE IMAGE:
---------------------------------------

Dim strGetPath
strGetPath = DLookup("path", "tblSettings", "tal=1")

If (strGetPath <> &quot; &quot;) Then
logo.Picture = strGetPath
End If


If a path excist that image is shown, otherwise the default image. The problem is if the path is invalid I get an error message. How do I get rid of it and displays the alternative image instead.


- Tom
 
Try using the Dir() function to verify the path instead of checking for an empty string.

For any error messages, use some error handling techniques. If you don't know what they are, I suggest you read the help file about them.

And, check to see if you need to display the picture after setting the path, like this: logo.display

Gary
gwinn7
A+, N+, I+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top