Printing forms with Pics: 1st picture shows on all 80 forms

J

js

I am using this code in my form that was obtained from the Net quite some
time a go. It has always worked well from Access until the day I decided to
print all my forms. For some reason during printing the pic is not updated
and in my case I end up with 80 printed records which all show the pic from
the first form.

Private Sub Form_Current()
On Error Resume Next
Me![ImageFrame].Picture = Me![Imagepath]
End Sub

Private Sub Imagepath_AfterUpdate()
On Error Resume Next
Me![ImageFrame].Picture = Me![Imagepath]
End Sub
Private Sub Combo32_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[NUMBER] = " & Str(Nz(Me![Combo32], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Imagepath is a table row in each record that stores the pathway to the
picture.
Imageframe is the name of the form image frame that displays the picture.

RRT
 
J

John Smith

I have never had to try this but I think that you will need to set the image
path in the Format Event of the Report Detail in the same way that you do in
the Form Current Event.

HTH
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top