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

Linked Objects on Reports

Status
Not open for further replies.

TheDoubleB

Programmer
Jan 29, 2001
18
0
0
US
I am creating a Employee book. I use the following code to display the linked picture on a form. The filename is stored in the table in field [PicLoc]. The form field name is [Image40]. If it isn't found I use the NoPicAvail.bmp.

Private Sub Form_Current()
Set fs = Application.FileSearch
With fs
.LookIn = "_PATH_"
.FileName = [PicLoc]
If .Execute > 0 Then
Me![Image40].Picture = Me![PicLoc]
Else
Me![Image40].Picture = CStr("C:\NoPicAvail.bmp")
End If
End With
End Sub

Simple enough, however my question is how do I translate this to a report.

The report was using and embedded picture field ([Pic]) in the table with an IIF statement to display the name if there was no picture.

=IIf(IsNull([Pic]),[FirstName] & ' ' & [LastName],'')

How do I accomplish this with a linked field?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top