Solved

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

Posted on 2004-10-11
7
205 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

733 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