Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2009
    Location
    Up Nort' Wi
    Posts
    140

    Unanswered: Forcing Form Sizes?

    Good morning,

    Tried searching both the forums and google, but, can't find anything that really fixes my problem.

    I've got my switchboard form to docmd.maximize in the formLoad(). Any form I open from the switchboard then opens maximized instead of at the size I set. Is there a way to get around this?

    I've tried popup/modal which works to an extent, however if I open a report from a popup form the form hangs in front of the report until I close the form...which is undesirable as there may be more than one report the user is going to want to run from that form.

    I've got the autoresize property off, I've tried manually setting the size for the new form in twips in the formload(), I've got the min, max, restore, close buttons all disabled and hidden, but, anything I try to do won't keep the form from autosizing when opening from a maximized form.

    Then to top it off, when the switchboard opens the child form, *it* then resizes to what I would consider a "restored" size and I can't seem to keep it maximized.

    Any thoughts, suggestions would be greatly appreciated,

    Sam

  2. #2
    Join Date
    Aug 2009
    Location
    Up Nort' Wi
    Posts
    140
    Ok, by doing some tedious coding and toggling the .visible property on and off in the reports and child forms, I've gotten it to mostly look right. However, now my reports open behind my switchboard.

    Is there a quick way (or even a long way) to set the focus on a report, as it opens, so it will be in the foreground?

    Thanks,

    Sam, Access 97 is for the birds

  3. #3
    Join Date
    Aug 2009
    Location
    Up Nort' Wi
    Posts
    140
    Woohoo! Further proof that there is justice in this world...I get to upgrade my Access to a version I'm actually familiar with (and get a dev computer to boot) so this question can go the way of the dodo.

    Sam, off to build a new pc

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    "I've tried popup/modal which works to an extent, however if I open a report from a popup form the form hangs in front of the report until I close the form...which is undesirable as there may be more than one report the user is going to want to run from that form."

    I use this routine all the time. You just need to make the popup form(s) invisible (me.visible = false) before opening the report. Then make the form(s) visible again when the report closes (Forms!MyForm!Visible = false) The data on the form will still be available for any criteria the report is based off of. (although I think you can only have 1 form invisible at a time - not sure - I usually close unneeded forms.)

    If you have a "background" form that opens and maximizes behind the popup form (I also make the popup form a modal form so the user can no longer use the MSAccess top menus with the background form loaded behind the popup form.) You may have to resize the background form when closing the report (ie.

    Forms!BackgroundForm.setfocus
    Forms!BackgroundForm.maximize

    (also - the switchboard is a poor item to use. Especially in multi-user environments where the "Main" form is based on a table which can easily time-out. (what was Microsoft thinking when they made the switchboard????)

    For multi-users, it's MUCH better to design a form that is not bound to any recordset and simply has the buttons on it to open the other popup forms (I also make my mainform a popup/modal). By doing this on all my forms, I basically control the "flow" of how the entire program works and you don't end up with forms hidden behind other forms which could cause problems dataset-wise.

    If you want to see how this works, check out the GetUser example in the code bank (or really any example by PKStormy since I use it in almost all my applications.)
    Last edited by pkstormy; 08-26-09 at 00:56.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  5. #5
    Join Date
    Aug 2009
    Location
    Up Nort' Wi
    Posts
    140
    Thanks for the advice, yeah that's what I ended up doing for the child forms on activate and unload, but, my switchboards are popup as well...for many reasons this thing needs to be a fullscreen app and popup seemed to be my best option with Access97...now that I'm upgrading to XP there may be other options I can look at for creating a fullscreen app, but, at least in XP I should be able to set my reports as popup so they'll take the forground focus when they open...perhaps not the cleanest route, but, probably the quickest.

    I think I may have misled you, people will log in using a form I built and depending on the credentials I set them will either send them to the data entry "switchboard" or the Admin "switchboard" (Both of which I built and coded...not a wizard created beast).
    I try not to let Microsoft do any more programming for me than absolutely required for it not to blow up...I like knowing what's in there and why.

    Thanks again,

    Sam, after 7 years off I'm finally climbin back on the Access horse...and what an ornery nag she is<g>
    Good, fast, cheap...Pick 2.

Posting Permissions

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