473,490 Members | 2,488 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Color Boxes in continious form or Datasheet

Dear All,

I have a table with many fields the relevant ones being
[Order],[Name],[RGB],[Color]. The table contains (at present) 16
records.

I would like to create a form which displays these fields (preferbally
in Datasheet view) where the [Color] field will show a box dependant on
it's respective [RGB] color.
I have tried the following so far :-
1) A textbox with a function that changes the .BackColor based on a
value. This simply changes the color of ALL the boxes (unless the form
is displayed as a single form)

2) Conditional formatting. This works but only for three possible colors
(and I have 16). I also tried putting a function similar to that in 1)
into the formatcondition, but no dice.

3) Create individual controls for each of the 16 color boxes. This is
time consuming and a bit of a pain if more records need to be added.
Individual controls seem to be the answer unless I am missing something.
In the long run I will want to use the Windows Common Dialog Controls to
select the color and simply store the RGB number, but first things first

Any ideas?
----
Sean
Just press the off switch, and go to sleep!
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
2 1506
Individual labels will work just fine, and have the lowest overhead. There
really shouldn't be too much to it. Just open your table, read the values,
and set the label properties according to the table.

Assume labels are name L1, L2, L3, etc.: (You could also use a control
array)

For x = 1 To 20
Me("L" & x).BackColor = rs.Fields("backcolor")
Next x

Darryl Kerkeslager

"Sean" <se*********@TimeaIntLtd.hu> wrote in message
news:41**********************@news.newsgroups.ws.. .
Dear All,

I have a table with many fields the relevant ones being
[Order],[Name],[RGB],[Color]. The table contains (at present) 16
records.

I would like to create a form which displays these fields (preferbally
in Datasheet view) where the [Color] field will show a box dependant on
it's respective [RGB] color.
I have tried the following so far :-

3) Create individual controls for each of the 16 color boxes. This is
time consuming and a bit of a pain if more records need to be added.

Nov 13 '05 #2
Thanks Darryl but that does not really solve my problem. I will try to
re-phrase it in more detail.

----
Sean
"Just press the off switch, and go to sleep!"

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3

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

Similar topics

2
4003
by: Damon Cherne | last post by:
Here is my issue. I have created a form called “Search” that has several unbound combo boxes, one for each of the attribute that match a column in the Table . Each combo box has input from a...
1
2386
by: MrPaulC | last post by:
Hey, I wonder if anyone can possibly help me with this problem. I'm really struggling with it. Ok, I have a form with a childform inside it which is in datasheet view, this form has two combo...
2
3103
by: Filips Benoit | last post by:
Dear All, Access 2003 adp on SQL_server 2005 A continious form showing 1 month based on table 'CALENDAR_MONTH_GRID' and fill with a SP. Fields: Companyname, Day1, day2, etc. The value in the...
0
2060
by: ARC | last post by:
I posted this before, but no response. Hopefully the MVP folks will know the answer. I'm not sure how other's are using the new split form, but what I like about it is I can design the header...
3
4699
by: Search & You Will Find | last post by:
I have a database in Access 2000 that I need some help on. I have three tables: PROJECTS, SYSTEMS, & SYSTEMSREF. They possess the following fields: -----------------------------------...
3
2782
by: Clint Stowers | last post by:
Access 2003 I have a Continuous Form. On Open I force it to go to the Last Record. When the form opens only the last record is shown at the top. To view any of the previous records you must...
2
3123
by: Alan Forsyth | last post by:
That rather long subject says it. In Access97 running on XP - I want to display a Maximized size Form01, then open a Restore size Datasheet View Form02 on top of the first Form. PopUp won't give...
4
1590
WyvsEyeView
by: WyvsEyeView | last post by:
I have a datasheet form in which one field is a combo box that will potentially contain hundreds of records. I've read about several methods of speeding up such combo boxes or limiting their initial...
3
2007
by: bibek24 | last post by:
I have a continious subform which is only visible when the main form gets open. The subform has a text box which is locked for the user.In order to enter something into it, a user has to click a...
0
7108
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
7142
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
7352
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...
0
5445
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,...
1
4875
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...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1383
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
618
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.