473,511 Members | 17,673 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stuck on images

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
Nov 12 '05 #1
5 1770
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

Nov 12 '05 #2
tom
Lauren,

One guess: it sounds like your appointment type table may be a
relatively small lookup sort of table. Might it be helpful to copy the
whole contents of the table locally, to a temporary Jet database, when
the application launches? That way, you don't have to pull bitmaps
through the wire for every record, especially when it sounds like it's
often the same image. If you link to the table (is this an adp or a
regular access database?), you should still be able to make a query
that joins the Appointment table to your temporary AppointmentType
table. Big caveat: this is a complete guess... I haven't worked with
bound images in Access.

-Tom
la*************@hotmail.com (Lauren Quantrell) wrote in message news:<47**************************@posting.google. com>...
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

Nov 12 '05 #3
Don,
Thanks for the response. I do in fact do this for all forms that are
not continuous forms and for reports. I am looking for a solution that
will work on a continuous form. It has me stumped.
lq

"Don Leverton" <le****************@telusplanet.net> wrote in message news:<FMBdc.27399$Sh4.6581@edtnps84>...
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

Nov 12 '05 #4
Lauren,

I think Tom has a good idea, but it is possible that you can handle it by
only downloading the image files themselves.

If you put them in the same folder in which the application is saved on each
machine, and they are linked, it should be "manageable". Then, in the SQL
server table, use the path to the local image. Caveat: I haven't done it
exactly this way because (fortunately) I did not have to display images in a
continuous forms view forms.

If your table of images changes, you can download it again to refresh the
local table with a little code at startup.

If anyone has a trick to allow you to handle continous forms images without
using Bound OLE, I'd guess it to be MVP Stephen Lebans,
http://www.lebans.com.

Larry Linson
Microsoft Access MVP
"tom" <to*@nuws.com> wrote in message
news:c1**************************@posting.google.c om...
Lauren,

One guess: it sounds like your appointment type table may be a
relatively small lookup sort of table. Might it be helpful to copy the
whole contents of the table locally, to a temporary Jet database, when
the application launches? That way, you don't have to pull bitmaps
through the wire for every record, especially when it sounds like it's
often the same image. If you link to the table (is this an adp or a
regular access database?), you should still be able to make a query
that joins the Appointment table to your temporary AppointmentType
table. Big caveat: this is a complete guess... I haven't worked with
bound images in Access.

-Tom
la*************@hotmail.com (Lauren Quantrell) wrote in message

news:<47**************************@posting.google. com>...
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

Nov 12 '05 #5
Tom,
What you suggest is exactly what I did when it was an access MDB
database and it worked great. All tables containing "static" data were
stored locally, things like tables holding images and rows used to
fill static combo boxes etc. The system worked great. I had a
date/time check against the a datetime field named
"StaticTablesModified" and if the local needed updating it would
update the local tables.
Except, now I'm using an Access2K ADP connected to SQL Server which
does not allow for that scheme.
lq

to*@nuws.com (tom) wrote in message news:<c1**************************@posting.google. com>...
Lauren,

One guess: it sounds like your appointment type table may be a
relatively small lookup sort of table. Might it be helpful to copy the
whole contents of the table locally, to a temporary Jet database, when
the application launches? That way, you don't have to pull bitmaps
through the wire for every record, especially when it sounds like it's
often the same image. If you link to the table (is this an adp or a
regular access database?), you should still be able to make a query
that joins the Appointment table to your temporary AppointmentType
table. Big caveat: this is a complete guess... I haven't worked with
bound images in Access.

-Tom
la*************@hotmail.com (Lauren Quantrell) wrote in message news:<47**************************@posting.google. com>...
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

Nov 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
933
by: nephish | last post by:
i have an html form with a drop-down list that lists a bunch of images. how can i get my cgi script to load the image ? i have imported cgi and os text entered from a form and read from a file do...
7
2352
by: Wayne | last post by:
I have a script that uses filesystemobject that reads files from a given path, in my case images. It is running on a server that is 2000 adv svr w/ all current patches. The script prior to some...
7
6792
by: Phil Powell | last post by:
Code: <!-- script src="/js/val_header.js"></script --> <style> <!-- BODY { scrollbar-3d-light-color:#eeeedd; scrollbar-arrow-color:#000000; scrollbar-base-color:#000000;...
5
385
by: Lauren Quantrell | last post by:
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...
3
3812
by: Simon | last post by:
This problem has been driving me mad for months.... Seen a few posts on forums about it but no answers... No mention on MSDN etc. XP Pro SP1, VS.NET (c#) .Net framework 1.1, IIS 5.1. In a...
4
2950
toxicpaint
by: toxicpaint | last post by:
Hi, can anyone give me a hand. I'm currently displaying 4 random images at the top of a page. I did this using an array of 35 pictures and then writing them to page. The problem I have is that in...
1
1730
by: srikumarcs | last post by:
Hi, I have a very peculiar situation at hand. I am to load a page with images and drop down menu's and flyouts.. Needless to say i am using javascripts.. If i click on some links or flyouts...
10
7355
by: dkyadav80 | last post by:
<html> /// here what shoud be java script for: ->when script run then not display all input text field only display selection field. ->when user select other value for institute only this...
0
7245
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7144
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7356
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7427
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7512
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.