473,594 Members | 2,651 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 1780
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\I con"
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....waitase c... 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.N et 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.goo gle.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 #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.go ogle.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************ ****@telusplane t.net> wrote in message news:<FMBdc.273 99$Sh4.6581@edt nps84>...
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\I con"
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....waitase c... 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.N et 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.goo gle.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 #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.goo gle.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.go ogle.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
"StaticTablesMo dified" 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.go ogle.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.go ogle.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
942
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 ok, but i cant seem to get it to load an image. the form writes all of the entries as lines in a .txt file this file is selected later, all the lines are read, and based on the first line of the text file determines the name of the
7
2357
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 patch updating worked fine and showed the pictures. Now the pictures no longer show when looking at the source code the absolute path of the file is correct but will not display the image. I tried it on another 2000 adv svr and the script worked...
7
6799
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; scrollbar-dark-shadow-color:#eeeedd;
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 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...
3
3819
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 nutshell when testing my ASP.NET (localhost) apps images randomly don't load on the page. Examining the IIS logfile shows the missing images give 401 or 403 errors. Here's an example - 10:15:47 127.0.0.1 GET...
4
2964
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 theory you could get the same image 4 times. I quite often get 2 of the same picture come up. What's the easiest way of saying "once an image is assigned to a variable, take it out of the array"? Here's my code so far.. images = new Array(34);...
1
1736
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 before the page loads completely, the page gets stuck. I have to wait for the page to load completely, before i can do any operation. Kindly suggest me some means of getting around this. I desperatley need a solution.. I am calling a function on...
10
7370
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 field display not display degree text field ->when user select other value in the selection field for degree then text field display and wise versa //// <bodly> <table>
0
7941
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7874
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8246
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8368
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8000
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8231
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6652
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5738
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
1476
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.