Linking to JPEG pictures

StephenD

Registered User.
Local time
Today, 08:13
Joined
Nov 23, 2001
Messages
38
Hi all,

I've got an access database that links to JPEG pictures stored on a particular network drive. Basically image codes are stored in the database and the user can select the image codes to view from a combo box. Once a user has selected an image code they would like to view they press a button which then loads the image onto the form. The code the button uses is as follows:-

Private Sub Command46_Click()
On Error Resume Next
Dim stLinkCriteria As String
Dim stDocName As String

stDocName = "Picture_Form"
stLinkCriteria = "[IMAGE_REF]=" & "'" & Me.Combo115 & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub

The "picture form" has the following code behind it in the 'On current' event:-

Private Sub Form_Current()
On Error Resume Next
Dim fs As Object
Set fs = CreateObject("scripting.filesystemobject")

Me.Image.Picture = "The Network Drive" & Me![Image_Ref] & ".jpg"

End Sub

It was all working fine but now seems to work only once!
I can select an image code press the button and hey presto!
However, if I then subsequently select another image code and press the button it doesn't load properly and just displays a blank form. I
t works fine on other people's machines but not on mine (which is a little dissappointing as I developed it and often have to give demo's on how the system works!)
This seems to have started since our IT department upgrading my operating system to Windown 2000 NT-don't know if ths makes a difference??

Can anyone help?

Thanks in advance,

StephenD
 

Users who are viewing this thread

Back
Top Bottom