Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying Pictures

Status
Not open for further replies.

Nitrous270

Technical User
Jul 27, 2002
67
0
0
US
Does anyone have any pointers displaying pictures in access.

File formats, jpeg, bmp, gif, ect???
Use thumbnails, or the original size???

My current settings for the picture window are Zoom, Stretch and the picture window is 2x2"

The reason I ask is b/c I tried using a 301x300 and 120x120 jpg both are really grainy and don't look that great.

Thanks,
Nitrous270
 
I don't know if this will help but I responded to a thread a while back and it addressed picture issues in forms and reports.

thread702-289543

Let me know if this was helpful.

Bob Scriver

Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
No thats not exactly what i had in mind. But after reading that I did fix a few things in my code so that was kinda helpful.

But my problem was getting the images to look crisp when they were displayed. I've taken care of that by changing the size of the image outside of access and scaling it down to the size of the display box inside access.

Now the only thing and I'm not sure if its a file size issue slow running code or what. But when I load / go to the next record, or anything that makes the picture refresh on the report, for a split second a box pops up "Importing such and such file" with a progress bar. I'm wondering how to hide this or change somethng w/ the file size of the picture maybe the directory path or something so this message doesn't show up even for a brief second.

Thanks,
Nitrous270
 
I am not sure if the command,

DoCmd.SetWarnings False

will keep this message from displaying. Give it a try. Make sure that you set them back to true after the new record is loaded.


Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Either I'm not putting it in the right spot or that command isn't getting rid of that, I'm not sure.

I ran the code on the on current event of the form where the picture path is retrived but it doesn't seem to change anything as far as the "importing image"

Specifically here is my code if it helps.

Thanks,
Nitrous270


Private Sub Form_Current()

Dim blnRelative As Boolean
Dim strFileName As String

DoCmd.SetWarnings (False)

strPath = CurrentProject.path

Me![CoverMsg].Visible = False
If Not IsNull(Me![Cover]) Then
blnRelative = IsRelative(Me![Cover])
strFileName = Me![ImagePath]

If blnRelative Then
strFileName = strPath & "\" & strFileName
End If

Me![ImageFrame].Picture = strFileName
ShowImageFrame
Me.PaintPalette = Me![ImageFrame].ObjectPalette

If (Me![ImageFrame].Picture <> strFileName) Then

strFileName = Left(CurrentProject.path, InStrRev(CurrentProject.path, &quot;\&quot;)) & strCoverDir & _
Right(strFileName, Len(strFileName) - InStr(strFileName, strCoverDir) - Len(strCoverDir) + 1)
Me![ImagePath] = strFileName
Me![ImageFrame].Picture = strFileName

If (Me![ImageFrame].Picture <> strFileName) Then
HideImageFrame
Me![CoverMsg].Caption = &quot;Album cover not found&quot;
Me![CoverMsg].Visible = True
End If
End If
Else
HideImageFrame
Me![CoverMsg].Caption = &quot;Click Add/Change to add album cover&quot;
Me![CoverMsg].Visible = True
End If

DoCmd.SetWarnings (True)

End Sub
 
It is in the correct place in your procedure but you can remove the parenthesis from around the False and True values. Not sure if that would affect it or not.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Kinda what I thought since I've used those commands other places in my code and they worked just fine, but no that didn't make a difference.

Thanks for the input so far. Anymore suggestions?
Nitrous270
 
Here is what is a link to another thread I posted on my solution to this problem.

thread702-588996
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top