Microsoft Access Picture control not showing image on all PC's

I'm trying to show an image on a form, but when i use code to alter the embedded image's Picture control source, it doens't show on all computers running the program. I cannot seem to find a common trend to what computers will show the image, and which will not. I've attached the code behind the textbox that updates the image control.

Note, if I hard code the image's Picture property with the path the the image, it shows on all PC's, it's only when I send the code below that it's hit or miss. Any help would be greatly appreciated!
thanks,
-Matt
Dim fName As String
            fName = Me![tbxThoughtPicturePath]
            Me![ImgThought].Picture = fName

Open in new window

Altek EmployeeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

omgangIT ManagerCommented:
Perhaps requerying the image control?

Dim fName As String
fName = Me![tbxThoughtPicturePath]
Me![ImgThought].Picture = fName
Me.ImgThough.Requery

OM Gang
 
omgangIT ManagerCommented:
Typo

Dim fName As String
fName = Me![tbxThoughtPicturePath]
Me![ImgThought].Picture = fName
Me.ImgThought.Requery

OM Gang
Altek EmployeeAuthor Commented:
It's telling me Requery cannot be used on that control
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

omgangIT ManagerCommented:
Sorry, intellisense displays Requery as one of the available properties for the control so I thought it was worth a try.

I have similar code (see below) to display an image on a form.  The only difference is the control is not visible when I set the Picture property
        'set picture source property for form image control and display control
    Me.imgSelectedImage.Picture = strSrcFile
    Me.imgSelectedImage.Visible = True

This works fine for me on both Win XP and Win 7 machines and in both Access 2003 and 2007 but the app is only deployed on a few machines.

See the attached image of the property sheet for my image control and look for any differences in the control on your form.

OM Gang
imagecontrol.jpg
Tony HungateClient Success Manager | CISSPCommented:
I have seen this on some machines when the hardware acceleration is set to high or to low for the attached display.  This is normally only seen with video, but it may be worth a look.

This link will walk you through how to change the settings.
http://libraries.risd.org/Downloads/TeacherResources/hardware_acceleration_settings.pdf

Hope it helps.

TLH

Jeffrey CoachmanMIS LiasonCommented:
Also, just for fun, try shortening the code and tweaking the syntax to just this:

    Me.ImgThought.Picture =Me.tbxThoughtPicturePath
Altek EmployeeAuthor Commented:
No luck as of yet. Access actually crashes on some computers "Execution of this application has stopped due to a run-time error" on the code
Me.ImgThought.Picture =Me.tbxThoughtPicturePath used in the on open of the form.


omgangIT ManagerCommented:
Perhaps try moving the code to a different event procedure.  The timing of Access form events is
Open ¿ Load ¿ Resize ¿ Activate ¿ Current

Try the Form_Load event.

Also, add an error handler to the procedure to see if you get more information on what, exactly, the error is.

Private Sub Form_Load()
On Error GoTo Err_Form_Load



Exit_Form_Load:
    Exit Sub


Err_Form_Load:
    MsgBox Err.Number & ", " & Err.Description, , "Error in Form_Load event"
    Resume Exit_Form_Load

End Sub

OM Gang

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Altek EmployeeAuthor Commented:
Thanks Om Gang,
Altek EmployeeAuthor Commented:
Thanks OM Gang,
That gave me the attached error. The file is only 209KB, but i can try it as a BMP
Capture.JPG
omgangIT ManagerCommented:
Interesting.  What is Digital Traveler?  I did a quick Google search but didn't find anything on it.  The image control on your Access form most certainly supports .jpg file types.

Please post the entire Form_Open or Form_Load procedure.

Thanks,
OM Gang
Altek EmployeeAuthor Commented:
I can get it to work as a BMP, but it looks really grainy, and I'm still not sure why JPG works on some computers but not all.
Altek EmployeeAuthor Commented:
Digital traveler is the name of the program.
Private Sub Form_Load()
On Error GoTo Err_Form_Load

Me.ImgThought.Picture = Me.tbxThoughtPicturePath

Exit_Form_Load:
    Exit Sub


Err_Form_Load:
    MsgBox Err.Number & ", " & Err.Description, , "Error in Form_Load event"
    Resume Exit_Form_Load

End Sub
omgangIT ManagerCommented:
Is Digital Traveler a program you developed or was it developed by someone else?  Out of curiosity, what references are loaded with the program?  Perhaps you can compare references between a machine that works and one that doesn't.  I've pasted an image of the references I have in my app using an image control on a form.  They're mostly just the basic/defaul references though.

Do .jpg images open fine otherwise on the machines that are having problems?

OM Gang
references.jpg
Altek EmployeeAuthor Commented:
I think I got it.

Microsoft Office installs with filters, these computers do not have office installed, only access run time. Which does not install these filters.

http://support.microsoft.com/kb/212265

I downloaded the filter pack, and it sucessfully worked on one computer. I'm going to keep trying with the rest. Thanks for your help, you certainly got me going in the right direction!
Altek EmployeeAuthor Commented:
Led me in the right direction.
omgangIT ManagerCommented:
Glad you've got it figured out.  Never even considered that you were working with machines without Access or Office installed.
OM Gang
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.