Results 1 to 6 of 6
  1. #1
    mcaldwell is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Apr 2009
    Posts
    4

    Print a different image per record

    I have created a form using an unbound object for images. It is linked to a text box that shows the path for the image. I am using the oncurrent procedure to change the image per record change.



    Now I want to do something similar on the report. I want to be able to print a sepereate image per record and one record per page. Everything I try produces one image for every record instead of changing per record.

    Any advice?

  2. #2
    thhui is offline Competent Performer
    Windows XP Access 2002 (version 10.0)
    Join Date
    Feb 2009
    Posts
    235
    Use vba in report

    Code:
    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
        Me.Image0.Properties("Picture") = "c:\pic1.jpg"
    End Sub

  3. #3
    mcaldwell is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Apr 2009
    Posts
    4
    Quote Originally Posted by thhui View Post
    Use vba in report

    Code:
    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
        Me.Image0.Properties("Picture") = "c:\pic1.jpg"
    End Sub
    Would I need to name my images pic1,pic2 or something with a counter? And then the "Picture" is the name of my unbound object?

  4. #4
    thhui is offline Competent Performer
    Windows XP Access 2002 (version 10.0)
    Join Date
    Feb 2009
    Posts
    235
    image0 is the image object name you put in the report to print
    just like any textbox or label you nornally put in the report.

    The report should normally based on database table.
    and the table should contain the field which is the path name of the image.

    Finally, you should ensure the datasource of the image object equal to
    the field of the path name of the printed image.

  5. #5
    mcaldwell is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Apr 2009
    Posts
    4
    I already have this in vba.


    Private Sub GroupHeader0_Print(Cancel As Integer, PrintCount As Integer)
    Me.Door_Image.Picture = Me.Image
    End Sub


    Door_Image is the name of the unbound control and me.image is the name of the field that contains the path to the image.

    When it is like that, no image shows up at all.

  6. #6
    mcaldwell is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Apr 2009
    Posts
    4
    Ok so I go back into the report and the control source was blank. I simply set it to the text field containing the path and it worked. Sometimes the simple stuff is the hardest to figure out.

    Thanks for all your help!!!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Filename displaying with image
    By Rob Parker in forum Forms
    Replies: 2
    Last Post: 01-13-2010, 05:05 PM
  2. Show a new image per record in a form
    By Bert Colourama in forum Forms
    Replies: 0
    Last Post: 09-25-2008, 05:22 AM
  3. Generate Image
    By dbman in forum Import/Export Data
    Replies: 0
    Last Post: 01-31-2008, 10:46 PM
  4. Image with its file name !!!!!
    By ahai in forum Access
    Replies: 0
    Last Post: 07-17-2007, 02:39 AM
  5. The file name with the image
    By ahai in forum Forms
    Replies: 0
    Last Post: 07-16-2007, 01:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums