I have so many items on the reports, with such long names, with conditional visibility and height requirements. It's tedious and long VBA code. Can I put a bunch of objects in a group and control that group as a whole?
Thanks!
I have so many items on the reports, with such long names, with conditional visibility and height requirements. It's tedious and long VBA code. Can I put a bunch of objects in a group and control that group as a whole?
Thanks!
http://blogs.office.com/b/microsoft-...-property.aspx
Tags?
UPDATE: So it looks like tags are it, what I'd like to do is check the len(trim(GROUP)) of the items grouped together...but can't seem to get that going...
THE REAL QUESTION: Can I group text objects in a tag, then check the length of the tag's object? Just looking for a >0!
THE ANSWER: Iterate thru all the controls on the form, looking for the tag name. Didn't know you could do this - found it in a blog.
Dim ctlCurr As Control
For Each ctlCurr In Me.Controls
If ctlCurr.Tag = "testtag" Then
Me.taglen = Len(Trim(ctlCurr))
End If
Next ctlCurr
UNSOLVE! This is returning a number, but I don't know what the number is. It is not accurate to the length of the control text items in the tag.
ANY INPUT APPRECIATED!
SOLVED and CONCLUSION: Woot!
Controls tagged together in a tag named group are in a collection. If you want to get the accumulated length of the text controls in a group...do this:
Dim ctlCurr As Control
Dim accumStr As String
For Each ctlCurr In Me.Controls
If ctlCurr.Tag = "testtag" Then
accumStr = accumStr + ctlCurr
End If
Next ctlCurr
Me.taglen = len(trim(accumStr))