Hi Lauren,
Are you storing the bitmap as an embedded object?
If so, I'd suggest using an unbound image frame instead, then use code to
assign the .Picture Property using a stored path string.
In the code below, the "Me![ImageFrame].Picture" property is set to the
contents of a bound field named ImagePath.
======================================
Private Sub Form_Current()
On Error Resume Next
If Me![ImagePath] <> "" Then
Me![ImageFrame].Picture = Me![ImagePath]
Else
Me![ImageFrame].Picture = ""
End If
Me.Refresh
End Sub
======================================
Or in your case, you might want this (and this is "aircode"):
======================================
Private Sub Form_Current()
Dim MyPath as String
Dim IconType as Long ' Or Integer?
MyPath = "C:\Icons\Icon"
IconType = Me![ApptType]
If IconType <> "" Then
Me![ImageFrame].Picture = MyPath & IconType & ".jpg"
'eg Me![ImageFrame].Picture = "C:\Icons\Icon1.jpg" or
Me![ImageFrame].Picture = "C:\Icons\Icon2.jpg", etc.
Else
Me![ImageFrame].Picture = "" 'If ApptType is blank, don't display any
picture at all.
End If
Me.Refresh
End Sub
======================================
*** Hmmm....waitasec... you said continuous forms... this probably wont work
for that, sorry. :-(
All records will likely show the same icon in a continuous form.
However....If you only need to have this image displayed in a printed report
.... I know it will work there, using the On Format event.
--
HTH,
Don
=============================
Use
My*****@Telus.Net for e-mail
Disclaimer:
Professional PartsPerson
Amateur Database Programmer {:o)
I'm an Access97 user, so all posted code
samples are also Access97- based
unless otherwise noted.
=============================
"Lauren Quantrell" <la*************@hotmail.com> wrote in message
news:47**************************@posting.google.c om...
I am really stumped on coming up with a good solution for this
problem...
I have an Access2K continuous form that has an image field. In a SQL
Server table of appointments is an integer field named ApptType. That
table is joined to the ApptType Field of table also holding an Image
field named ApptIcon.
When the use propulates the continuos form, if ApptType = 1 then Icon
1 is displayes, ApptType = 2 then Icon 2 is displayed, etc.
The icons are very small 32x32 pixels, but it is very slow over slow
connections.
I am hoping someone can give me a better way to do this or perhaps a
way to speed up what I'm doing...
Help is greatly appreciated.
lq