Solved

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

Posted on 2004-10-11
7
206 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

729 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