Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MicroSoft Access question

Status
Not open for further replies.

amathis

Technical User
Dec 31, 2000
5
US
I would like to be able to change the color of a specific field of a recordset when entering data into a form. For example, I am entering data into a form and I come to the comments field, I want to enter data but would like to change its font color for that specific record to highlight it when I print a report or view on the screen.. Does anyone know how to do it..
I am able to do it with numbers in a budget form when the actual amount exceeds budget amounts, however, I don't know how to do it with text only.. It would be nice just to double click and have the font color automatically change.. I know I have to do it in visual basic but have not figure out how to do it..

Thanks,
Allan

 
Allan - I don't quite underastand what you are trying to do... or rather on what event you want the text to change colour. Please either email me the app to have a look and help you out or explain further what you require.
Cheers
Jo Dennis
jo.dennis@acxiom.com
 
In the gotfocus place
me.controlname.forecolor = 255

to turn it red

in the lostfocus
me.controlname.forecolor = 0

turns it back to black
 
Thanks for the replys.. braindead2 I had already tried your suggestion...

What I am trying to do is to be able to highlight a field in a recordset.. i.e lets say I have a form I am filling out and there are 10 records. The database has lastname, firstname, address and comments. If I go back and review the database through my form and decide I would like to highlight one of the comments(permenantly)... how would I do this.. This allow me to print out a report with a single highlighted field or multiple fields as I choose.

The application is a project list at work where I can review my subordinates lists, move throught the database and highlight a field for future reference, questions etc...

Thanks,
Allan
 
To record that you want a field highlighted you're going to have to put a new field in your table. So, stick a yes/no field in the table and use this to record which records you want to highlight. If you're using a continuous form I don't think you can change the properties of a textbox on just one record without changing it on all records so maybe you should put a checkbox or some other control that will show that the record in question is highlighted. Durkin
alandurkin@bigpond.com
 
You cannot change the colour of one record in a continuous or datasheet form. Best to follow Durkin's advice.....

:eek:)
 
Thanks for everyones help... I had a feeling I could not do what I wanted.. When their is a field that I want highlighted, I change it to uppercase..

Thanks again for everyones help,
Allan
 
see my question on access forms at "change lable based on yes/no box". thred 702-43737 not my answer so I take no credit.
good luck
 
also you can do conditional formating based on the value of a box on a report the two together maight acomplish what you want. luck again
 
JMANER... wonder if this would work with a comment field that was all caps..i.e. comment field "NEED TO REVIEW THIS NOW".. looks at the field sees it is all caps and changes is font, color etc... possibility..

Thanks,
Allan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top