D
Dale Fye
Does anyone know how or if you can call a function and pass it a control in a
conditional formatting expression of a textbox on a continuous form?
I've done some font size analysis and developed a function fnDoesItFit(ctrl)
which accepts the name of a textbox control. It then does a quick assessment
of whether the text in the textbox will fit within the area of the textbox
and returns a boolean value. I've implemented this in a single forms current
event and it works great to allow me to change the background color and
scrollbar property of the control based on the amount of text.
However, what I really want to do is use this on a continuous form, and
rather than putting it in the current event (which would affect the textbox
in each of the records), I want to put the function call in the Conditional
Formatting of the textbox. I know I won't be able to affect the scrollbar
property, but if I can at least highlight those records where the text
exceeds the size of the textbox, it will make viewing the data easier.
I've tried setting the condition to "Expression Is", and then entering:
fnDoesItFit(me.txt_TextString) = 0
In the expression, but this is not working.
Thanks in advance.
conditional formatting expression of a textbox on a continuous form?
I've done some font size analysis and developed a function fnDoesItFit(ctrl)
which accepts the name of a textbox control. It then does a quick assessment
of whether the text in the textbox will fit within the area of the textbox
and returns a boolean value. I've implemented this in a single forms current
event and it works great to allow me to change the background color and
scrollbar property of the control based on the amount of text.
However, what I really want to do is use this on a continuous form, and
rather than putting it in the current event (which would affect the textbox
in each of the records), I want to put the function call in the Conditional
Formatting of the textbox. I know I won't be able to affect the scrollbar
property, but if I can at least highlight those records where the text
exceeds the size of the textbox, it will make viewing the data easier.
I've tried setting the condition to "Expression Is", and then entering:
fnDoesItFit(me.txt_TextString) = 0
In the expression, but this is not working.
Thanks in advance.