Results 1 to 7 of 7
  1. #1
    stellar0645 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    4

    Printing form: image fails to update

    Hello:



    I have a form that includes an image - the image is tied to a key number on the form so that a different image appears as the records change. The code to fetch the image is an Event procedure in the form properties (On current) (I don't know if this is part of the problem):

    Option Compare Database

    Private Sub Form_Current()

    Me!Image49.Picture = [Image_Path]

    End Sub

    As I page through the records, the images change to match the key number, no problem.

    Problem: When I Print Preview or Print, the same image is printed for every record - there is no updating during the print process.

    The images are not in the MDB but are stored on the hard drive with their location in [Image_Path].

    Any thoughts on what is causing this? I need to print these records WITH the proper image.

    Thank You . . . . .
    Last edited by stellar0645; 01-28-2010 at 01:41 PM.

  2. #2
    Guus2005's Avatar
    Guus2005 is offline Carbon based thingy
    Windows 7 Access 2003
    Join Date
    Jan 2010
    Location
    the netherlands
    Posts
    42
    You might want to add the DoEvents command to let windows run other jobs such as screenupdates.

    Enjoy!

  3. #3
    stellar0645 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    4
    Quote Originally Posted by Guus2005 View Post
    You might want to add the DoEvents command to let windows run other jobs such as screenupdates.
    Enjoy!
    OK, thanks, I'll try that.

    Is that the full syntax or is there much more to it?

    Thanks, cheers . . . .

  4. #4
    Guus2005's Avatar
    Guus2005 is offline Carbon based thingy
    Windows 7 Access 2003
    Join Date
    Jan 2010
    Location
    the netherlands
    Posts
    42
    DoEvents is the complete command.

    When your not sure try F1

    HTH

  5. #5
    stellar0645 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    4
    OK, thanks. I looked up the syntax and tried it but no luck.

    Apparently no events are triggered during Form Print - thanks MicroSoft.

    Thanks, cheers . . . . .

  6. #6
    Jamy is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Feb 2010
    Posts
    36
    If you want to have multiple images, you'll need to create a report and open the on print screen, then use the code on detail level. Event: 'on format'.
    The code is correct.

  7. #7
    stellar0645 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    4
    Quote Originally Posted by Jamy View Post
    If you want to have multiple images, you'll need to create a report and open the on print screen, then use the code on detail level. Event: 'on format'.
    The code is correct.
    Thanks, I've got it figured now with much help (not from Microsoft).

    You're basically correct, create a report with a line of code similar to the line that synchronizes the record and image in the form.

    The good news is that a report can be created by cloning a form - Save As -> Report. Another hidden feature.

    Thanks, cheers . . . . .

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

Similar Threads

  1. Insert an image in a form
    By bladu in forum Forms
    Replies: 1
    Last Post: 09-10-2009, 11:13 AM
  2. Parameter Query Fails Occasionally
    By jp2access in forum Programming
    Replies: 0
    Last Post: 08-26-2009, 07:33 AM
  3. Error displaying image on form
    By mamba716 in forum Forms
    Replies: 6
    Last Post: 06-17-2009, 09:13 AM
  4. On delete cascade fails in constraint clause
    By Victor EGBE in forum Queries
    Replies: 0
    Last Post: 03-02-2009, 09:52 PM
  5. 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

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