highlighting a field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to let the user 'highlight' a field on a form? I know I can
set the property to be a permanent color. But my user wants the ability to
change the color at will - similar to highlighting info on a spread sheet!
 
Do you want to save this setting colors per user?
I'm sure that the user wouldn't like changing the setting every time he gets
into the form, so I'm sure that the answer to the above question will be Yes.

I'm not familliar with a buildin in Access that can do it, and I wouldn't
get into it, it will involved alot of work
 
Thanks for the prompt response!

Yes, the user would like to save the colors until the status changes and
then use a different color to indicate the change. Where can I find out how
to give the user this flexibility ?
 
Hi Nancy

I am not aware of any addins either to do this, but you *could* program it
up as follows if you are using a single form:

1. create a FieldColours table with a FK to the table that will be editted
as well as a field containing a numeric value for the backcolour (you might
want one for the forcolour as well) and for the userid

PK - Autonumber
UserId
TableFK
ControlName
ControlCurrBackColour
ControlCurrForeColour

2. On the oncurrent event, check the above table for the current PK, user
and relevent controls and set the back/fore colour as held in the table
3. If the user is in the field, and press (for eg) a function key, you can
trap this with the onKeyDown event, and then set the back colour based on
whatever your rules are and the current setting of the coluor of the field
(e.g - if current colour is blue, set next colour to red, if current colour
is red, set to white etc.)
4. Update your FieldColours table to hold the new field colour

This is aircode, but it should work
 
Thanks Chris ... sounds doable, just will take time for me to attempt it !
Could you explain what you mean by " FK to the table", and "PK" in the
following?

1. create a FieldColours table with a FK to the table that will be editted

PK - Autonumber

Thanks again for the tip :)
 
Sorry Nancy, force of habit!

FK - Foreign Key
PK - Primary Key

Every table should have a primary key, and if one table references another
table the key to that other table is referred to as a Foreign Key.

A Primary Key is always unique, and can contain one or more columns. You
identify the fields that comprise the Primary Key when in table design by
highlighting them, and the pressing the Primary Key button.

I tend to use Autonumber for my PK in every table, but you can nominate any
group of fields so long as the group is always unique, and then when holding
it as a Foreign Key, you just need a Number field of type long to hold the
value

Good luck with your project.
 
THANK YOU :)

Chris said:
Sorry Nancy, force of habit!

FK - Foreign Key
PK - Primary Key

Every table should have a primary key, and if one table references another
table the key to that other table is referred to as a Foreign Key.

A Primary Key is always unique, and can contain one or more columns. You
identify the fields that comprise the Primary Key when in table design by
highlighting them, and the pressing the Primary Key button.

I tend to use Autonumber for my PK in every table, but you can nominate any
group of fields so long as the group is always unique, and then when holding
it as a Foreign Key, you just need a Number field of type long to hold the
value

Good luck with your project.
 
Back
Top