Need ability to have data dependent icons on continuous forms...
Need ability to have data dependent icons on continuous forms...
am 06.12.2007 21:19:58 von David Haskins
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
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
Re: Need ability to have data dependent icons on continuous forms...
am 06.12.2007 21:36:28 von Davidb
On Dec 6, 3:19 pm, Dave 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
> 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
You coudl do somethign with the OnCurrent event of the continuous
form. Try setting the image based on the animal type on the oncurrent
event. You may have to mess around with repainting after you change
the image source. Let me know if that helps.
Re: Need ability to have data dependent icons on continuous forms...
am 07.12.2007 05:47:37 von John Mishefske
Dave wrote:
> 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 had a similar requirement on a project. Client wanted a continuous
form that displayed all the individual parts that went into a component
including a picture of each part.
My solution was to create an unbound form that looked like a continuous
form - e.g. 10 rows of controls that displayed data and an image control
to display the picture.
I wrote code to load the data into the unbound controls and to navigate
through the parts (buttons for "Next Page", "Prev Page") table.
This type of solution gives you a lot of freedom in controlling behavior
but requires a fair amount of code to basically build what Access
already provides.
--
'--------------------------
' John Mishefske
' UtterAccess Editor
' 2007 Microsoft MVP
'--------------------------
Re: Need ability to have data dependent icons on continuous forms...
am 07.12.2007 12:20:23 von lyle
On Dec 6, 3:19 pm, Dave wrote:
> Does anyone have any other ideas? I'm stumped here.
It's a toughie question, but a solution might make continuous forms
more intuitive.
I can place a transparent command button above an image. Of course, a
transparent copmmand button does not look like a button; it doesn't
look like anything. In Access 2007 I can set the [Cursor On Hover]
Property of the Command Button to HyperlinkHand
(acCursorOnHoverHyperlinkHand=1). When I run my cursor over my
transparent command button it appears that I am running it over the
image. The cursor becomes a hand; as there is just one cursor, it
can't become a hand on the other other command buttons on other
records. When the cursor leaves the command button it returns to its
default shape.
No, it's not the nice border glow of the command button. But it is a
visual signal that the cursor is over something that a click will
activate, and many users will be familiar with the notion because of
their web exposure. Is it available in versions before Access 2007? I
don't know.
Re: Need ability to have data dependent icons on continuous forms...
am 07.12.2007 15:55:46 von David Haskins
On Dec 6, 2:36 pm, DavidB wrote:
> On Dec 6, 3:19 pm, Dave 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
> > 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
>
> You coudl do somethign with the OnCurrent event of the continuous
> form. Try setting the image based on the animal type on the oncurrent
> event. You may have to mess around with repainting after you change
> the image source. Let me know if that helps.- Hide quoted text -
>
> - Show quoted text -
Thanks, but I don't think that will help much. I need to display the
whole series of icons at once, it's intended to be an aid to help
users choose the records they are interested in.
Re: Need ability to have data dependent icons on continuous forms...
am 07.12.2007 15:57:47 von David Haskins
On Dec 6, 10:47 pm, John Mishefske wrote:
> Dave wrote:
> > 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 had a similar requirement on a project. Client wanted a continuous
> form that displayed all the individual parts that went into a component
> including a picture of each part.
>
> My solution was to create an unbound form that looked like a continuous
> form - e.g. 10 rows of controls that displayed data and an image control
> to display the picture.
>
> I wrote code to load the data into the unbound controls and to navigate
> through the parts (buttons for "Next Page", "Prev Page") table.
>
> This type of solution gives you a lot of freedom in controlling behavior
> but requires a fair amount of code to basically build what Access
> already provides.
>
> --
> '--------------------------
> ' John Mishefske
> ' UtterAccess Editor
> ' 2007 Microsoft MVP
> '--------------------------- Hide quoted text -
>
> - Show quoted text -
John, I *do* like what you suggest, and there it no doubt it would
work, and nicely. It may just be a little more coding than I have time
for at the moment. Thank you.
Re: Need ability to have data dependent icons on continuous forms...
am 07.12.2007 16:04:53 von David Haskins
On Dec 7, 5:20 am, lyle wrote:
> On Dec 6, 3:19 pm, Dave wrote:
>
> > Does anyone have any other ideas? I'm stumped here.
>
> It's a toughie question, but a solution might make continuous forms
> more intuitive.
>
> I can place a transparent command button above an image. Of course, a
> transparent copmmand button does not look like a button; it doesn't
> look like anything. In Access 2007 I can set the [Cursor On Hover]
> Property of the Command Button to HyperlinkHand
> (acCursorOnHoverHyperlinkHand=1). When I run my cursor over my
> transparent command button it appears that I am running it over the
> image. The cursor becomes a hand; as there is just one cursor, it
> can't become a hand on the other other command buttons on other
> records. When the cursor leaves the command button it returns to its
> default shape.
> No, it's not the nice border glow of the command button. But it is a
> visual signal that the cursor is over something that a click will
> activate, and many users will be familiar with the notion because of
> their web exposure. Is it available in versions before Access 2007? I
> don't know.
I think something like your solution will be what I end up going with.
Unfortunately, the CursorOnHover property is a new feature with Access
2007, and I'm currently developing on the 2003 version. Even so, I
think the transparent button is likely my best option, it's at least
the best one I've found so far. Thank you.
Re: Need ability to have data dependent icons on continuous forms...
am 20.12.2007 18:53:41 von laurenq uantrell
Dave,
Create a command button. Set the value to transparent.lace it over the
bound image control that is populated as I wrote. This will accomplish
what you want.
On Dec 10, 11:54 am, Dave wrote:
> On Dec 9, 6:39 am, Lauren Quantrell
> wrote:
>
>
>
>
>
> > On Dec 6, 3:19 pm, Dave 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
> > 2 Elephant
> > 3 Sheep
> > 4 Cow
> > 5 Horse
> > 6 Pig
> > 7 Dog
> > 8 Goat
> > 9 Cat
>
> > 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- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
>
> Thanks, Lauren.
>
> Unfortunately, your post addresses the part of the process I already
> had in place, not the part I needed help with. Thank you for your
> time, though.- Hide quoted text -
>
> - Show quoted text -