Short version:
Is there a way to check if the contents of a field fit in a textbox which is bound to that field?
Or is it just a matter of estimating how many characters would normally be visible in the textbox, and checking the length of the field?
Long version:
I have a subform in continuous view, made to look like datasheet view.
The subform has two text boxes bound to fields "What" and "Comments" - it also has some date and currency fields, but they're not relevant to this question.
The subform has a footer that is not visible by default. The footer contains an unbound text box.
The GotFocus events of the two textboxes sets the footer to visible and binds the textbox on the footer to either "What" or "Comments" so that the user can see more of the text, and doesn't think they have to fit it on one line.
This works fine.
But what I would like to do is only show the footer if the contents of the fields are longer than can be displayed in the textbox on the Detail section of the form.
Is there a clever way to do this, or is it just simply a matter of estimating how many characters might usually be visible in the bound textbox, and testing if the field length is greater than that?
Is there a way to check if the contents of a field fit in a textbox which is bound to that field?
Or is it just a matter of estimating how many characters would normally be visible in the textbox, and checking the length of the field?
Long version:
I have a subform in continuous view, made to look like datasheet view.
The subform has two text boxes bound to fields "What" and "Comments" - it also has some date and currency fields, but they're not relevant to this question.
The subform has a footer that is not visible by default. The footer contains an unbound text box.
The GotFocus events of the two textboxes sets the footer to visible and binds the textbox on the footer to either "What" or "Comments" so that the user can see more of the text, and doesn't think they have to fit it on one line.
This works fine.
But what I would like to do is only show the footer if the contents of the fields are longer than can be displayed in the textbox on the Detail section of the form.
Is there a clever way to do this, or is it just simply a matter of estimating how many characters might usually be visible in the bound textbox, and testing if the field length is greater than that?