Results 1 to 3 of 3
  1. #1
    tstoneami is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    71

    Can report items be part of a "group"?

    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!

  2. #2
    tstoneami is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    71
    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

  3. #3
    tstoneami is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    71
    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))

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Export "Query or Report" to a "Delimited Text File"
    By hawzmolly in forum Import/Export Data
    Replies: 3
    Last Post: 08-31-2012, 08:00 AM
  2. Replies: 1
    Last Post: 08-23-2012, 08:32 AM
  3. Replies: 4
    Last Post: 04-18-2012, 12:09 PM
  4. Replies: 16
    Last Post: 07-22-2011, 09:23 AM
  5. "Group By" causes "ODBC--Call Failed" error
    By kaledev in forum Queries
    Replies: 1
    Last Post: 03-09-2011, 02:43 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums