Results 1 to 5 of 5
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,080

    Variable layout

    If one has a form with column headings and corresponding bound TB's beneath them and wants to have a variation of the column layout, i.e., add a column and/or suppress a column, is there an easy way to toggle between layouts when the form opens? One way of course would be to have two form definitions and open selectively. However, when there's a lot of functionality behind the form's code sheet, design principles sort of go "out the window" and maintenance of duplicate code would become a nightmare. Tabs isn't the answer with this app and its user set. Toggling of visibility depending on which version of the form is desired is one clear way of doing this in the OPEN code, but the design view would be somewhat cumbersome to say the least.



    Any thoughts?

    Thanks,
    Bill

  2. #2
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Would it be practical to use VBA to modify the column headings and the control sources of the text boxes? It might work if there not too many of them.

    John

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,080
    John,
    That was my first thought. That being to have two super-imposed Column text boxes and column labels and simply set the visibility properties according to the desired version of the display. There are 10 TB's and the corresponding 10 column labels, so the design view would be tedious to deal with.

    In the case of 7 of the TB's and their corresponding column labels, I'd really only have to change their x displacement within the form. While the property sheet specifies those displacements in inches, I think the code would have to set them in units of Twips?

    Bill

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,642
    Yes, VBA expects TWIPS.

    I do both of what you describe - turn subforms on or off as well as reposition controls. Only workable with single view form.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,080
    Hey June,
    I'm glad you mentioned "Only workable with single view form". The form in topic here is continuous..........OUCH!
    Off to bed, I'll think more about it in my dreams
    Bill

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

Similar Threads

  1. Replies: 3
    Last Post: 05-28-2013, 12:53 PM
  2. Replies: 2
    Last Post: 03-15-2013, 12:49 PM
  3. Replies: 0
    Last Post: 08-10-2011, 11:59 AM
  4. Replies: 4
    Last Post: 08-05-2010, 01:26 PM
  5. Refering to variable form names inside a variable
    By redpetfran in forum Programming
    Replies: 2
    Last Post: 05-21-2010, 01:39 PM

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