I’ve looked around and found a few VBA codes on how to grab the description out of the field’s “Description” box, but not how I can use that in a form’s properties.
I’d like to have a ControlTip appear with the Description of that field brought from the Description in the database, without having to rewrite all the descriptions; I’m hoping for a copy-paste bit of code that I can add to all controltips?
Something like (but obviously not)
ControlTipText: Me.ThisControl.ThisControlFieldDescription
Anybody know of the code, or even if there is one?
EDIT:
description = Forms("frmTrials").Controls("txtBox").StatusBarText
MsgBox description
The above works to show the status bar text. However I’d like to fill “frmTrials” with the active form and “txtBox” with the currently active control; that way when the control becomes active I can put the StatusBarText into a “Description Box” text field (or the control tip, etc). I tried
description = Forms(Me).Controls(Me.ActiveControl).StatusBarText
which just threw errors at me.
Ended up using a text field to show the descriptions instead of the control tip. I also have an informative photo appear (if there is one so named in the given folder). I should note that I do not have any handling in place for images which are not PNG format, though I’m sure that could be added.