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

Form Background color

Status
Not open for further replies.

MetalicPrism

Programmer
Apr 3, 2005
17
CA
I have had a request to change the background color of a MS Access form based on the value of a textbox. I can get the code to work in the Form Activate event fine... But that sucks. The DataChange is not working as the data is not changed really I guess just passed to the next record. I was reading that there is a go around in continuous forms, but it is not what I am looking for... uless of course I am looking stupid here and there is more then one breed of them. This is just a straight form view, not like the "list like" view I was shown in the exsample. It would be optimum to put the code in the click event of the data control, however that is not to be seen in the design view of the form. Is this a doable thing or are all forms continuous forms when clicking through records.
 
Try putting your code in the On Current event of your form. That way the code will run every time you move to another record.

If your form's view is set to Single Form then this should do what you require.

HTH
Lightning
 
Hey thanks ... I have not done a lot in Access I had tried many of the events and there was no onChange. Works like a brand new toaster the color pops up right :)Perfect thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top