Images Forms advancing (1 Viewer)

bretdunlap

Registered User.
Local time
Today, 05:08
Joined
Nov 15, 2011
Messages
54
HI

It is minor but I was wondering if there was a solution. I have a form that calls 2 separate .jpg images One image is a small graphic this is about 1.6 KB the other is a picture of a person that is very small in fact the smallest setting I could find. If I advance through the data base fast you will see a small box appear that is grey with a path on it saying Importing : the the path. If I go really fast it locks up Access. I have tried to move the folders containing the images to the same one of the access file, I have reduced the image size etc.

I am stumped any thoughts.

FYI I am self taught and a new bee it has take me a year to get where I am lol.

every thing else works works great.
 

Attachments

  • error.jpg
    error.jpg
    19.6 KB · Views: 90

Max D

Registered User.
Local time
Today, 05:08
Joined
Jul 3, 2009
Messages
91
Thats not usual Access behavior. Can you tell more about your setup? Do you use any scripting or third party components?
 

bretdunlap

Registered User.
Local time
Today, 05:08
Joined
Nov 15, 2011
Messages
54
Scripting not sure what you are referring to And no 3rd party. I am runing windows 7 on a new laptop.

I will post the code that I use.


Dim tyy As String, dog As String, cat As String

tyy = DLookup("[Pic Path]", "Pic Path Table2", "ID = 1")
dog = Text28
cat = ".jpg"

If IsNull(Me.Text28) Then
Me!Image8.Picture = ""
Else: Me!Image8.Picture = tyy & dog & cat
End If


Dim ttyy As String, ddog As String, ccat As String

ttyy = DLookup("[Pic Path]", "Pic Path Table2", "ID = 2")
ddog = StudentID
ccat = ".jpg"

If IsNull(Me.StudentID) Then
Me!Image4.Picture = ""
Else: Me!Image4.Picture = ttyy & ddog & ccat
End If





On Error GoTo myError

myError:
'Me!Image4.Picture = ""

I apologise in advance if it is ugly lol
 

Simon_MT

Registered User.
Local time
Today, 13:08
Joined
Feb 26, 2007
Messages
2,177
Out of interest what version of Access are you using?

Simon
 

bretdunlap

Registered User.
Local time
Today, 05:08
Joined
Nov 15, 2011
Messages
54
I have tried reducing the size of the image, I have moved the 2 groups of images to one folder I have even moved everything to the same folder and it is still happening. I notice in the bottom left when I advanced to the next record it says calculating and I was wonder if it was calculating while I was advancing and the was causing the hang up. FYI I am a pure novice I have hundreds of hours of code in this mainly trial and error and revers engineering etc. I real have no clue how/why all this works just that it does lol So please forgive any ignorance in advance.
 

Simon_MT

Registered User.
Local time
Today, 13:08
Joined
Feb 26, 2007
Messages
2,177
Maybe to you need to referentially render the images.

First declare the Image Directory Path:

Code:
Function GetPictureDir() As String
    GetPictureDir = "C:\Databases\Images\"
End Function

Then express the file Name in a Query behind the Form or Report:

I don't how you get C-WHT-GST? Lets say it is ad ID of some description

ImageFile: [ID] & .jpg

Then:

Code:
Function GetPicturePath()
    With CodeContextObject
        GetPicturePath = GetPictureDir & .[ImageFile]
    End With
End Function
Code:
Function GetPicture()
    With CodeContextObject
            .[ImageControl].Picture = GetPicturePath
    End With
End Function

Simon
 

bretdunlap

Registered User.
Local time
Today, 05:08
Joined
Nov 15, 2011
Messages
54
C-WHT-GST Refers to Champions-White belt-Green stripe it is a picture of a kids karate belt. that is the name of the picture file as well as the drop down for the belt so in other words every time I change a belt the picture of the belt appears a s well.

FYI thanks for the feed back I will try it when i get home.
 

bretdunlap

Registered User.
Local time
Today, 05:08
Joined
Nov 15, 2011
Messages
54
attached is the whole screen clip
 

Attachments

  • screen.jpg
    screen.jpg
    96.4 KB · Views: 71

boblarson

Smeghead
Local time
Today, 05:08
Joined
Jan 12, 2001
Messages
32,059
Thats not usual Access behavior.
Good thing the OP found the article but it IS usual Access behavior. Mostly just when you are using links to a server and the image can't load immediately.
 

bretdunlap

Registered User.
Local time
Today, 05:08
Joined
Nov 15, 2011
Messages
54
Thanks every one for all the help by the way it worked like a charm.
 

Users who are viewing this thread

Top Bottom