Re: Need ability to have data dependent icons on continuous forms...
- From: Lauren Quantrell <laurenquantrell@xxxxxxxxxxx>
- Date: Sun, 9 Dec 2007 04:39:12 -0800 (PST)
On Dec 6, 3:19 pm, Dave <dahask...@xxxxxxxxx> wrote:
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
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
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
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
DataID int (PK)
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:
AnimalID int (PK)
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:
LEFT OUTER JOIN
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,
- Prev by Date: Re: Islamic Manners (1): Sidq (Truthfulness
- Next by Date: Re: Display pictures on a continues sub form
- Previous by thread: Re: Need ability to have data dependent icons on continuous forms...
- Next by thread: Re: Need ability to have data dependent icons on continuous forms...