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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BackColor 1

Status
Not open for further replies.

mellay

Technical User
Oct 3, 2001
33
US
Hi!

I am using a checkbox to change the backcolor of another field. However the change in color is not being saved when the record is closed. Any way to save the change in color when the record is closed and re-opened? I am using:

Check Box Event Procedure On Click [Field 2].BackColor = 12632256
Check Box Event Procedure On Dounle Click [Field 2]. BackColor = 12632256

On click of the Check Box, the background of Field 2 changes to grey.
On Double Click of the Check Box, the bacground of Field 2 changes back to white.

This works fine w/ the exception that the grey color is lost when the record os closed and re-opened.

Any help would be greatly appreciated!! Love this Forum!! Thanks! Mellay
 
If the check box is being stored as part of the record, you can look at its' value in the form's ON CURRENT event and re-color the other fields BACKGROUND as needed:

Sub Form_Current()
if Me!CheckBox = True then
me!OtherField.BackColor = vbWhite
else
me!OtherField.BackColor = vbGrey
End if
End Sub

If the check box is NOT being stored as part of the record, I see no way of "resetting" the color attribute without storing it somewhere else...

78.5% of all statistics are made up on the spot.
Another free Access forum:
More Access stuff at
 
Thank you very much for your prompt response! I am working on this now. Thank you again! Mellay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top