Solved

Photo Image on Form causes wierd dialog box to appear/disappear on Current Event

Posted on 2004-10-11
7
204 Views
Last Modified: 2008-02-01
I have a text field with the path/filename of an image in an Access XP database. On the subform of a main form I have placed an Image box, and I update it to display the photo file on several events. This works fine, however, when the Current event of the form (subform) fires, and the image box displays the image, there is a fleeting dialog box that appears and disappears so quickly I can't really tell what it is. I have tried to capture it by stepping through the code, no luck. I have tried turning on and off the warnings - doesn't matter. Doesn't make any difference if error handling is on or off. Does anyone know what this is, and how I can disable it? It will be annoying to the users, who will surely ask me what it is. Everything else seems to work fine.

Here is the code that populates the image box:
---------------------------------------------------
Private Sub CallDisplayImage()

'On Error Resume Next
'DoCmd.SetWarnings False

    If Not IsNull(Me!LinkToPhoto) Then
        Me!ImageFrame.Picture = Me!LinkToPhoto                 'LinkToPhoto is the text box with path/filname
        Me!ImageFrame.Visible = True
    Else
        Me!ImageFrame.Visible = False
    End If
   
 'doCmd.SetWarnings True
End Sub
-------------------------------------------
Private Sub Form_Current()
    CallDisplayImage
End Sub
---------------------------------------------

I'm wondering if there is some way to slow down the process so I can see that dialog box? Any help much appreciated - this is driving me nuts.

0
Comment
Question by:SWisowaty
  • 3
  • 3
7 Comments
 
LVL 8

Expert Comment

by:JonoBB
ID: 12277685
Lol, get a slower computer and put it on a laggy network

Whilst I have no idea what the dialog box is saying, I suspect that its telling the user to wait while it fetches the picture and embeds it into the form. I wonder if the picture was very small (1kb) and on your own hard drive (not the network), if you would even notice the dialog box......

I am not sure if there is a work around

0
 
LVL 26

Expert Comment

by:Alan Warren
ID: 12277880
Ok, you have an image control and you have an OnFormCurrent event to populate your image control with the image in a specified path

Private Sub Form_Current()
  Me.Image4.Picture = Me.txtpicPath
End Sub

The dialogue that you see says "Importing C:\somepath\some.jpg"


If you want to slow it down so you can read it, locate one of the images and open with photo ed, then resize the image +500%, that should give you time to read the the dialogue.


ps... Its actually good if you dont get time to read the dialogue.


Alan
0
 

Author Comment

by:SWisowaty
ID: 12277940
JonoBB - Yes - I believe you're probably right, since this is a linked object and must be downloaded each time to display in the interface. Hmmm... I've weighed the pros/cons of the embedded and linked objects, the oLE objects versus the links to a text path, and I'm not really happy with either solution. I'd love a solution that both eliminated unnecessary bloat in the db, while keeping the display in the interface fast and light, but I'm not sure that's a realistic objective. :) Thanks for the input.
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

Author Comment

by:SWisowaty
ID: 12277959
Alan - thank you! Do you know of anyway to inhibit that dialog? I really don't want the users to see anything flashing. Thanks.
0
 
LVL 26

Expert Comment

by:Alan Warren
ID: 12277965
If you want to hide the dialog, then I think you need edit a registry entry:
http://www.experts-exchange.com/Databases/MS_Access/Q_20597718.html

Alan
0
 
LVL 26

Accepted Solution

by:
Alan Warren earned 500 total points
ID: 12278008
I do know a better way but it takes a little more know how:
Using binary long objects(Blobs) with Microsoft Access
http://www26.brinkster.com/alzowze/Blobs.asp

Alan

0
 

Author Comment

by:SWisowaty
ID: 12278171
Thanks Alan - brilliant! I will look into that. Appreciate all your help.
-Susan
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question