Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2011
    Posts
    24

    Unanswered: What Is Easiest Way To Scale Up A Form?

    Hey all, running into an interesting problem. Wrapping up a project, it's all finished, however now the client wants everything bigger. The DB was designed in case users were using smaller screens, but it's since been verifed it will only be access from 1024x1280 or bigger. So now I've got to got through and manually increase the size of all the elements on ALL the forms. There's like 40 forms, so I was looking for the quickest way to do this. Is there an option to "scale up" an element, or maximize or something. Or am I looking at several hours of clicking the corners of boxes and dragging them out?

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You can always enumerate the Forms collection, and for each form, enumerate its Controls collection:
    Code:
    Sub ListAllFormsAndControls()
    
        Dim obj As AccessObject
        Dim dbs As Object
        Dim frm As Form
        Dim ctl As Control
        
        Set dbs = Application.CurrentProject
        For Each obj In dbs.AllForms
            DoCmd.OpenForm obj.Name, acDesign
            Set frm = Forms(obj.Name)
            Debug.Print frm.Name
            For Each ctl In frm.Controls
                Debug.Print ctl.Name
            Next ctl
            Set frm = Nothing
            DoCmd.Close acForm, obj.Name, acSaveYes
        Next obj
        Set dbs = Nothing
        
    End Sub
    In this example, I only print the name of every object (Form and Control) in the Debug window, but once you have a reference to an object, you can modify its properties, such as it's size (Width and Height), its position (Left and Top), etc.
    Have a nice day!

Posting Permissions

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