Re: Need ability to have data dependent icons on continuous forms...



On Dec 6, 3:19 pm, Dave <dahask...@xxxxxxxxx> wrote:
Hello All,

These one may be a bit tricky, and what I'd like to do may not even be
possible. I would love to hear any ideas you guys have for solving
this.

Here is the situation: I have a form that displays the high-level data
for a set of records in continuous forms mode. I have a simple command
button that will open another form with the details of the selected
record.

The records are divided into categories, and I'd like to be able
display a picture on the button to visually inform users of a specific
record's category. To put that specifically, I'll call my table
"Animals" and the categories "Horse," "Cow," "Sheep," and "Pig." Each
record is for one individual critter, and I'd like to be able to show
the appropriate graphic of a horse on the button for just those
records that describe a horse, etc.

It seems that linking an image to the command button is not the
answer, as all the buttons end up being the same on all the records.

I have found that I can display the appropriate pictures using a Bound
Dave,
What you're looking to do is very simple. I have done it in a number
of datanase builds, provided the images you wish to display are
relatively small and the total number of records you wish to display
is relatively small.
To give you an idea on the limits, I have built numerous forms that do
this that display images that are 32 x 32 pixels where the total
number of records returned is in the hundreds (not thousands.)

Here's how you can do this very easily:

You'll do this with two tables. One is your existing table that stores
data:

tblExistingData
DataID int (PK)
AnimalInfo varchar(50)
AnimalID int

This one will have data in it that looks like this:

1 This is my cow 4
2 This is my neighbor's dog 7
3 I rode this horse 5
4 I know this sheep 3
5 Some smelly pig 6

You need to create a new table that stores the images:

tblAnimalImages
AnimalID int (PK)
AnimalName varchar(10)
AnimalImage image

Into this table you copy and paste your icons into the appropriate
image column. The data will look like this:

1 Giraffe <giraffe icon>
2 Elephant <elephant icon>
3 Sheep <sheep icon>
4 Cow <cow icon>
5 Horse <horse icon>
6 Pig <pig icon>
7 Dog <dog icon>
8 Goat <goat icon>
9 Cat <cat icon>

Create your continuous form displaying the fields you want to show and
include a bound image frame bound to AnimalImage

Create a query that links your two tables:

SELECT
d.DataID,
d.AnimalInfo,
i.AnimalImage
FROM
tblExistingData d
LEFT OUTER JOIN
tblAnimalImages i
ON d.AnimalID = i.AnimalID





Object Frame, and I can make that frame look more or less like a
command button by setting the special effect to Raised. But I have not
been able to find a way to make the faux button act like a button -
when I use the mouse up and mouse down events to change the special
effect from raised to flat, it does look like a button, but all of the
buttons in the other records change as well, which is not exactly the
effect I was hoping for.

Does anyone have any other ideas? I'm stumped here.

Thank you for your time,

Dave

.



Relevant Pages

  • Re: Need ability to have data dependent icons on continuous forms...
    ... display a picture on the button to visually inform users of a specific ... this that display images that are 32 x 32 pixels where the total ... AnimalID int ... Elephant <elephant icon> ...
    (comp.databases.ms-access)
  • Re: Display pictures on a continues sub form
    ... relatively small and the total number of records you wish to display ... this that display images that are 32 x 32 pixels where the total ... AnimalID int ... Elephant <elephant icon> ...
    (comp.databases.ms-access)
  • Re: Name change
    ... windows - you just don't have the room for anything else if you ask me. ... You can do a lot with an 80x25 character display. ... icon for each window (either globally or on just the current virtual ... I'd say it's the CPU itself (or one ...
    (uk.people.support.depression)
  • Re: Capture the Computer Desktop
    ... it should capture the entire display and save it if it is called correctly ... icon you are using. ... Private Const BITSPIXEL = 12 ... Obviously that address is really a dummy, but basically I'll drink almost ...
    (microsoft.public.vb.general.discussion)
  • Re: Name change
    ... You can do a lot with an 80x25 character display. ... icon for each window (either globally or on just the current virtual ... Umm, ish, okay, so I do have a temperature displayed. ... I'd say it's the CPU itself (or one ...
    (uk.people.support.depression)