Solved

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

Posted on 2004-10-11
7
201 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

762 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now