Results 1 to 14 of 14
  1. #1
    Join Date
    Aug 2009
    Posts
    22

    Unanswered: How to reduce the size of the form.

    I'm trying to figure out when I'm creating a Form how to make it smaller then full screen... sadly enough I cannot figure it out.

    In design view I have it set to 8" across and 5" down but when I view it in form view it takes up the hole screen.

    I'm using Access 2007 any help would be greatly appreciated.

    Rob.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    is trhe form set to be maximised.

    dunno about 2007 but Access has an odd habit of occasionaly deciding to maximise all screens. often thats because the developer maximised a window for visibility some stage

    if this is an issue then consider placing some code in the forms on open event that sets the size.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Dec 2009
    Posts
    3
    Im having a problem with this too, I have researched various codes, in order to re-size, but they dont seem to be working.. it keeps coming up with DoCmd is not a recognised macro??!! Can anyone help?

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    This will cause the form to open to its designed size:
    Code:
    Private Sub Form_Load()
     DoCmd.Restore
    End Sub
    This code has to be in the VBA Code editor window for the form, not in the Events tab of the Properties Pane.

    Also note that code does not run in 2007 unless your database resides in a folder that has been declared a “trusted” location.

    To trust your folder, click:

    1. Office Button (top left)
    2. Access Options (bottom of dialog)
    3. Trust Center (left)
    4. Trust Center Settings (button)
    5. Trusted Locations (left)
    6. Add new location (button)
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    Join Date
    Dec 2009
    Posts
    3
    Thankyou, got it sussed now (At last)

  6. #6
    Join Date
    Aug 2009
    Posts
    22
    Quote Originally Posted by Missinglinq View Post
    This will cause the form to open to its designed size:
    Code:
    Private Sub Form_Load()
     DoCmd.Restore
    End Sub
    This code has to be in the VBA Code editor window for the form, not in the Events tab of the Properties Pane.
    Sorry to be a newb on this but can you give me a step by step on how to achive this? I've tried it but got nothing. So clearly I'm doing something wrong.
    Last edited by BwillieS; 12-14-09 at 10:09.

  7. #7
    Join Date
    Aug 2009
    Posts
    22
    Still having no luck with one guys.

  8. #8
    Join Date
    Aug 2009
    Posts
    22
    Still having problems with this

  9. #9
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by Missinglinq View Post
    This will cause the form to open to its designed size:
    Code:
    Private Sub Form_Load()
     DoCmd.Restore
    End Sub
    This code has to be in the VBA Code editor window for the form, not in the Events tab of the Properties Pane.

    Also note that code does not run in 2007 unless your database resides in a folder that has been declared a “trusted” location.

    To trust your folder, click:

    1. Office Button (top left)
    2. Access Options (bottom of dialog)
    3. Trust Center (left)
    4. Trust Center Settings (button)
    5. Trusted Locations (left)
    6. Add new location (button)
    is your code in a trusted directory
    I'd rather be riding on the Tiger 800 or the Norton

  10. #10
    Join Date
    Aug 2009
    Posts
    22
    Still nothing.....

    Ok so this is what I'm doing.

    Open access.
    Load data base (auto loads to first form)
    With form open:
    -View -> design view

    In the design view tab click "view code" then add in the above code to my desired form?

    If so this isn't working... is there something else that could be holding the change back??

    Thanks for the help to this point guys.

  11. #11
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so if its in a trusted directory
    then try to put a break/watchpoint on the code. cant be certain as I don't use 2007 but in the code window click the vertical bar to the right of the code ou want the brekapoint to be.

    then run the code
    it should stop (break) on that statement.

    if it doesn't then theres several possibilities
    1) you have a code complialtion problem. compile the code and make certain there are no compilation faults
    2) historically access doesn't alwasy recognise code that has been typed directly into the code window. so check that the event is checkmarked in the forms properties
    failing that I'd do a compact and repair just to see if that clears the fault (Access has ben known to gets its knickers in a twist)
    I'd rather be riding on the Tiger 800 or the Norton

  12. #12
    Join Date
    Aug 2009
    Posts
    22
    Ok... maybe I need to take a step back and ask another question.

    This "restore" in DoCmd.Restore how does it know what size to restore it to? are these settings I've set up previous? where can I change these settings?

  13. #13
    Join Date
    Aug 2009
    Location
    Up Nort' Wi
    Posts
    140
    Restore *should* be the size of the form at design time. If your db window is maximized it'll try to open everything else maximized.
    One way I've gotten around Access (2k2) automatically opening forms in a maximized window is to set the Popup property for the form to yes. Otherwise within the VB window for the form go to "Form_Load" and put in your "DoCmd.Restore".
    Make sure when you save your form in design view the form design window isn't maximized as well, I've run into it happening before that when you save a form while maximized it stays maximized until you manually resize it.

    Sam, hth
    Good, fast, cheap...Pick 2.

  14. #14
    Join Date
    Aug 2009
    Posts
    22
    Finally got it working! It was the popup property causing me the problem. Thanks for all the help guys!!

Posting Permissions

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