473,396 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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
Dec 6 '07 #1
7 3284
On Dec 6, 3:19 pm, Dave <dahask...@gmail.comwrote:
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.
Dec 6 '07 #2
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
'--------------------------
Dec 7 '07 #3
On Dec 6, 2:36 pm, DavidB <je...@yahoo.comwrote:
On Dec 6, 3:19 pm, Dave <dahask...@gmail.comwrote:


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.
Dec 7 '07 #4
On Dec 6, 10:47 pm, John Mishefske <jmishefsk...@SPAMyahoo.comwrote:
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.
Dec 7 '07 #5
On Dec 6, 3:19 pm, Dave <dahask...@gmail.comwrote:
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
Dec 9 '07 #6
On Dec 9, 6:39 am, Lauren Quantrell <laurenquantr...@hotmail.com>
wrote:
On Dec 6, 3:19 pm, Dave <dahask...@gmail.comwrote:
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- 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.
Dec 10 '07 #7
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 <dahask...@gmail.comwrote:
On Dec 9, 6:39 am, Lauren Quantrell <laurenquantr...@hotmail.com>
wrote:


On Dec 6, 3:19 pm, Dave <dahask...@gmail.comwrote:
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- 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 -
Dec 20 '07 #8

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

Similar topics

2
by: CSDunn | last post by:
Hello, I need some assistance with error handling in an Access 2003 Project form. The project is has a data source connection to a SQL Server 2000 database. The main form is named...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
4
by: Law.Win | last post by:
I have been looking for a way to figure out how to pass specific record information from a continuous form onto another form. What I have done was created a button in the detail section to open...
1
by: Dave Alger | last post by:
Hi, I've got a subform which has its default view set to "Continuous Forms". What I want to be able to do is switch programatically between "Continuous" and "Single". I note that most View...
9
by: Susan Bricker | last post by:
Greetings. I am having trouble populating text data that represents data in my table. Here's the setup: There is a People Table (name, address, phone, ...) peopleID = autonumber key There...
8
by: Keith Smith | last post by:
I know this is a little off topic but I hope it is still acceptable to this forum. Please read this carefully. I am not looking for a quick answer - I am hoping to find someone who has been in my...
1
by: Bill | last post by:
Problem: Combo box data disappears from view when a requery is done See "Background" below for details on tables, forms & controls On a form, I want to use the setting of bound combo box C1...
5
by: Mark | last post by:
Hello, I am fairly new to programming VS2005 Windows Apps, but am highly experienced in VB6. I am used to creating data access forms in VB6 using code for connections, commands, etc. Should I...
5
by: Michael R | last post by:
Searching the net I've found a simple technique to add row numbers and alternate colors (for the even and the uneven row) to a continuous form. 1st step: Create a textbox, send it to background...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
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
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...
0
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
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...

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.