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

Changing ForeColor Back to Original ForeColor on the Label of a SubFor 1

Status
Not open for further replies.

quest4

Technical User
Aug 27, 2001
735
US
Good afternoon folks. I got the label of the SubForm to change to a different ForeColor when I go into a Subform from my MainForm by using this code:
Me.Parent.[PartNumber(s)_ Label].ForeColor = 33023
There I enter several PartNumbers then I would like to exit the SubForm and have the SubForm change back to the original ForeColor. I can't get the ForeColor of the Label to change back to the original ForeColor. I have tried the following code in the LostFocus, OnExit and the Form's Lost Focus events, but I only get the debugger again. Here is the code:
Me.[PartNumber(s)_ Label].ForeColor = 16764057
and I have also tried:
Me.Parent.[PartNumber(s)_ Label].ForeColor = 16764057
Any suggestions? Thank you in advance for any assistance rendered.
 
How are ya quest4 . . . . .

Change

Me.[PartNumber(s)_ Label].ForeColor = 16764057

To

Me![PartNumber(s)_ Label].ForeColor = 16764057


TheAceMan [wiggle]

 
Thank you very much for the response AceMan. One quick question, where you put that code, which event? Thank you again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top