I cross posted this to another site and with a little back and forth came up with the code posted below. One one of the forums, I have a textbox, called txt Total, whose control source is set to add up all of the rest of the textboxes on the form (there are several). Font Bold = False End If End Sub But, much to my surpise the code never ran because the event did not fire when the total in the textbox changed. Like many things in programming, it's just a personal preference. Back Color = 16777215 '16777215 White 65280 Green End If End Sub This just didn't work, and I was convinced that the change event was not being triggered, but I was wrong! Linq ;0)if the data is coming from a third party then make the default value for the column 0, unless you actually want a null value. On investigation what I found was that when you start to change the text in one of the boxes, the change event fired but the 'If' routine wasn't working because the .value at that point doesn't reflect the change, whereas the does. Hello, I have a text box placed in a chart that links to another sheet/cell for its content. I can format the source text using conditional format, but the formatting doesn't carry forward into the text box. Is there a way to script/macro or use if/then for the value of a text box to change the font color?
the real reason was that she was using 0 as a default value instead of null so when using the domain average fucntions she was getting the 'wrong' answers ie a value of 0 was interpreted (correctly) as a mark of 0 and therefore that dragged the averages down.
Linq ;0) 100 Then Msg Box "The total for the this metric can not exceed 100%. This would put the total a 110% which is not allowed, so in addition to the message box saying "No No you fool" I do not want the datatable updated with 60, but left at 50. After Update fires as soon as you leave the Textbox, before the Record is updated, so if an entry in any of the Calculation's component Fields throws the total over 100 you'll know it immediately.
Please make the necessary adjustments.", vb OKOnly vb Exclamation, "Total Exceeds 100" txt Total. Isn't that what, theoretically, Before Update and Cancel = True should do? I suppose you could use the Controls' Before Update events and use Cancel, but I tend to stay away from them because in some situations they can trip you up. What you mustn't do is to change the second half "Me.
the precise events is up to you, and how you want to handle this data error.
I'd suggest in the forms on current record (so that it flags an error when the record changes) behind each controls on change event behind the forms on update event I wouldn't use a modal message box as those get seriously annoying if you are doing data entry.