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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unbound image

Status
Not open for further replies.

mybers

IS-IT--Management
Mar 24, 2004
62
PH
Hello Everyone,

I used the script below in my form to show an unbound image sourced from a directory in drive C:\, which worked well!

Now, Im hoping to figure out how can I do the same thing in the report...Show the unbound image....

Here's the Script used in the report. Please check what Ive missed or in error...

Private Sub Report_Open(Cancel As Integer)
On Error GoTo errhandler
Dim y As Integer
Dim directory As String
Dim extension As String
directory = "d:\picture\"
extension = ".jpg"

Me.image1.Picture = directory & Me.empid & extension
errhandler:
If Err = 6 Then
Me.image1.Picture = "d:\picture\nopicture.jpg"
End If
Resume Next
End Sub

Thanks

Francis
 
Basically put the same code structure in the Detail Section's Format event procedure. This will modify the image controls .picture property on your report with the complete path and name of your image on your computer.

Take a look at the following thread: thread702-289543

This quite lengthy thread started out with just the question that you have posed here. It has gotten a lot of play over the last two years but if you read my first reponse I believe it answers your questions specifically.

Post back if you have any questions.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top