Full Version: Change font color of a single record
UtterAccess Forums > Microsoft® Access > Access Forms
rbowman
Hope everyone had a happy holiday.
I'm having a problem with a simple task.
I have created a continuous form and I want to change the font color in only one record when I click in that text box. Unfortunately, every text box record changes color when I click in that text box.
Here's my code:
Me.PIPEID.ForeColor = 32768
Is it possible to change the font color of a single record?
Thanks, Rob
niesz
Take a look at Conditional Formatting.
freakazeud
Hi,
check: change background of current record
and
conditional formatting!
Continuse forms can be a little tricky!
HTH
Good luck
iandouglas
There's an option in the Conditional formatting dialogs to trigger when the field has the focus - perhaps you could do something with that?
rbowman
I think I can make the conditional formatting work. I'm wanting the user to be able to select multiple records and have each of these text box records change color. I can put a true/false field in the form and use this to change the color of each record that is clicked.
Thanks for the help!
Rob
freakazeud
The ture/false control has to be bound though! If it is not then the change will apply to ALL records.
HTH
Good luck
rbowman
Thanks for tip!
There are 32,000 records in the table, but hopefully a true/false field won't noticeably slow down the database.
ob
freakazeud
It shouldn't, but that's the problem with continuous forms!
Good luck
rbowman
For those of you who may have the same problem, this is a summary of what I did to solve the problem:
reated a new Yes\No field that I called "Select"
Placed this as a checkbox on the continuous form
Change the conditional formatting on the text box to: Condition 1: "Expression Is" "[Select] = True"
I want to thank everyone for helping me finish this task.
Robert
freakazeud
You're welcome.
Glad we could assist.
Good luck on future projects!
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.