Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Posts
    126

    Unanswered: How to create list of size & position of all controls on a report

    I would like to create a list of the size (.height, .width) and position (.top, .left) of all the controls on a report.

    I know how to step through all the controls in the controls collection, that is not a problem, but my question is...

    How do I output this information, where the heck do I put it all? What do I tell the function to do with this data that it's returning? Please help, it will make me happy, and I will post the solution because it is useful for lots of things.

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Lightbulb

    You can make 4 dynamic arrays and store the required data in it.
    Or
    You can make a table with 4 Fileds and make a record set of it then, go through the controls collection and store the required Datat in it.

  3. #3
    Join Date
    Feb 2004
    Posts
    126
    I like both of those suggestions very much.

    Let's say that I store the data in 4 arrays, how would I go about displaying that information, say in an Excel spreadsheet? That's really my question.

    I think I can figure out how to get the data, but I don't know where to put that type of data so i can view it.

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    I think you'd be better off going the table route if you intend to export it. Create a temporary table and dump everything in there, then export, then drop the table.

    Seems quite a bit neater then dealing with iterating through a multi-dimensional array to write to an external file..

  5. #5
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    The Table suggestion is better for your situation, as Teddy mentioned, you can per one statement, [DoCmd.OutputTo] export your datat to Excel.

    The arry suggestion, you have to write your own function to export the content of the four arrays

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •