Hi Guys,
Apologies if this has been asked before …. I have not been able to find an answer for it in the forums.
I have a form with in excess of fifty text boxes on it (actual & forecast spend by month, subcategorised by operational and capital spend, with totalling to give total forecasted spend for the year, plus several categorys of budget subtotalled to give total budget for year). The form also has a RAG (‘Red/Amber/Green) control on it to indicate the current state of spend against budget.
I cannot use the standard conditional formatting for the RAG control because there is also a fourth state (Blue) to indicate a project is closed. The conditional formatting is therefore done in VBA.
Is there a way I can trigger an event (or is there an event I can use?) so that when a value is changed in one of the fifty or so text boxes, the VBA code to set the RAG will be run? I currently have the code on the Form_Current event (or to be more precise a call to a sub which sets the RAG in the Form_Current event). This works if you move to another record and back again but is not triggered simply by changing a value in one of the fields and pressing Enter.
I realise I could attach an event to each of the fifty or so text boxes to achieve this but was looking for a quicker, more elegant, solution first.
Many thanks in advance.
Apologies if this has been asked before …. I have not been able to find an answer for it in the forums.
I have a form with in excess of fifty text boxes on it (actual & forecast spend by month, subcategorised by operational and capital spend, with totalling to give total forecasted spend for the year, plus several categorys of budget subtotalled to give total budget for year). The form also has a RAG (‘Red/Amber/Green) control on it to indicate the current state of spend against budget.
I cannot use the standard conditional formatting for the RAG control because there is also a fourth state (Blue) to indicate a project is closed. The conditional formatting is therefore done in VBA.
Is there a way I can trigger an event (or is there an event I can use?) so that when a value is changed in one of the fifty or so text boxes, the VBA code to set the RAG will be run? I currently have the code on the Form_Current event (or to be more precise a call to a sub which sets the RAG in the Form_Current event). This works if you move to another record and back again but is not triggered simply by changing a value in one of the fields and pressing Enter.
I realise I could attach an event to each of the fifty or so text boxes to achieve this but was looking for a quicker, more elegant, solution first.
Many thanks in advance.