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

Pictures in Forms 1

Status
Not open for further replies.

brendoaccess

Technical User
Mar 28, 2006
27
GB
I have a form 'Residents' that displays a photo for each client record - and it works fine, as long as each record has an assigned photo - if not, the blank record takes on the photo of the previous record, and continues until the next record that has an assigned photo.

I tried to correct it with this, which doesn't work;

Private Sub Form_Current()
On Error Resume Next
If Me![ImagePath] = " " Then
Me![ImagePath] = "D:\NOIMAGE.JPG"
Else
Me![ImageFrame].Picture = Me![ImagePath]
End If
End Sub

Any ideas?

Many thanks
 
Perhaps something like this ?
If Trim(Me!ImagePath & "") = "" Then Me!ImagePath = "D:\NOIMAGE.JPG"
Me!ImageFrame.Picture = Me!ImagePath

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Bang on the money - top notch.

Many thanks

A star for you.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top