Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form focus (a2K)

    All my main forms are set to maximise on load and open.
    If I switch to another program and minimise the database into the startbar, the forms don't maximise when recalling.

    Is there a way to fix this.

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form focus (a2K)

    Hi Dave, I've been following your posts and can see your project is coming along nicely!

    I think your find if you put the maximise command in the on activate statement for the form it should work out you want. Something like this should do it:

    Private Sub Form_Activate()
    DoCmd.Maximize
    End Sub

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form focus (a2K)

    Thanks for the info Rupert.
    I already have that statement in the on Activate and still have the same problem.
    I've also tried using a macro also.
    Perhaps because I have about three nested forms, setting focus after regaining them, confuses which to give the focus to.

    Thanks for the kind words regarding my project, which I may add, wouldn't have been possible without the help from many on this site.
    In particular ( I can't name you all) Hans, Charlotte, Mark, Wendell who tirelessly endeavor to help, whatever the problem.

    In my bio it says I am converting a dataflex db to windows and feel I have to be quite open about this.
    I wouldn't like to pull the wool over any-ones eyes.
    Reading my previous posts would surely give away the fact I am working on a big project.
    Perhaps it was a little too big for a starting project.
    The help from this site has enabled me to see and have involvement in an entirely different world from what is my true trade.

    The words of encouragement are a massive help in staying focus'd on my end product.

    I've thanked many many people who have helped me along and given my questions priority. I've never had any tuition in VB or VBA but feel quite confident working along-side those who choose to help.

    I'm sure I speak for loads of newby's and posters, appreciating all the moderators and experts, who just maybe gain a little satisfaction from the knowledge that they spread.


    Well done to you all.

    p.s

    <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30> ( Have I gone over the top again) <img src=/S/puke.gif border=0 alt=puke width=60 height=15>

  4. #4
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form focus (a2K)

    >>>>>>Have I gone over the top again<<<<<<<<

    No, not at all! You have to give the mods a bit of praise now and again!!! <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>


    Seriously, you've said everything I would like to say to the mods and more. I too have benefited greatly from all the people that put tonnes of effort into this site.

  5. #5
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form focus (a2K)

    Hi Dave

    Would the following:

    The following example selects the form Customers in the Database window:

    DoCmd.SelectObject acForm, "Customers", True

    before DoCmd.Maximize do the trick

    HTH

    John

  6. #6
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form focus (a2K)

    Hi Rupert

    I have my Maximize in load event, should it be in both places? or is Maximize in Load redundant?

    John

    Private Sub Form_Load()
    DoCmd.Maximize
    End Sub


    Private Sub Form_Activate()
    DoCmd.Maximize
    End Sub

  7. #7
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form focus (a2K)

    I too am annoyed by the behaviour Dave describes.

    I have always put the maximise command in the on load statement, I did a quick experiment on a temporary form when I saw Dave's question. I put the maximise command in the activate statement, and I see what you're getting at if it's in the activate statement then you don't need it in the on load statement.

    The only problem with having it in the activate statement is that if you happen to want to use your form "not maximized" When you leave it and go back to it it will be maximized.

    I suppose you could write some complicated statements to see which forms were open etcetera and decide when you want this activate maximise to execute. <img src=/S/sad.gif border=0 alt=sad width=15 height=15>

    There may be away to do it through windows, but that's out of my league!

  8. #8
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form focus (a2K)

    Thanks for the kind words. Moderators and WMVPs are always grateful for appreciation. <img src=/S/bow.gif border=0 alt=bow width=15 height=15>

    I had missed the item about it being a Dataflex database you were converting! You have my sympathies. I worked with a commercial app written in dataflex about 10 years ago and it drove me nuts! Especially since the company that developed it hadn't read the dataflex manuals closely. I wound up telling *them* how to do stuff they insisted couldn't be done ... and I didn't develop in dataflex! As I recall, it was either a Clipper or a bTrieve clone and a thoroughly ugly customer.
    Charlotte

  9. #9
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form focus (a2K)

    Switching to another program doesn't require minimizing the database. Is there another reason you're doing this?
    Charlotte

  10. #10
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form focus (a2K)

    If I had known the issues of the conversion, I probably wouldn't have started it.
    I'm glad I did though. The system we use (dataflex) is user friendly and been with us for many years.
    My aim is to emulate rather than convert, with familiar forms that we know what comes next, rather than a totally new system that requires extensive training.
    So far I am pleased with the results.
    The problem is, when I use my receptionists to do test runs, I get the "Can it do this, Can you make it do that.".
    Its all good fun really.

    Any way back to the problem.

    In a normal working day, we will be using up to three programs at a time.
    The management system, (my db) and two estimating systems.
    When switching between them, two are always dormant on the start bar.
    Using alt tab, we will call the program we need.
    It would be easier to close the other two and open them as needed, but this is the real world.
    So.
    What happens when I call my db from the start bar, is, the forms don't maximise.

    I guess if I new the correct size to make the forms, it wouldn't be a problem.

    So if the resolution is 800x600, what should the maximum size of a form be ??

  11. #11
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form focus (a2K)

    Alt+Tab will switch between the programs whether or not they're minimized. If you're using Window NT or later (I can't remember how Win9x behaves), you'll still see a button on the taskbar for each app.
    Charlotte

  12. #12
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form focus (a2K)

    Is you machine set up to show the loaded apps in the taskbar at the bottom of the screen? If so, you don't have to minimize anything to see them there, just switch to a different app. In that case, clicking one of the buttons in the taskbar will return the app just as you left it. If you minimized anything, it will still be minimized because you haven't unloaded it or done anyting else like that, you just switched the processor's attention to the other application for a while. If you minimize the Access main window using the buttons in the upper right corner of the Access app window, then click on the button in the taskbar, it will come back in whatever condition you left it, including maximized. You must actually be minimizing the forms or the database window, which will result in the behavior you described.

    Is it absolutely necessary to fill the screen with your forms? I personally don't like the look of maximzed forms and we don't use them in our commercial applications. It's too hard to get things centered on a form that will change sizes depending on the screen resolution, although there is code in the ADH to handle resizing to screen resolutions and Peter's Software has a ShrinkerStretcher you can purchase that will atuomatically resize your forms to different screen resolutions.
    Charlotte

  13. #13
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form focus (a2K)

    After further investigation into this, it seems to be happening because the forms in question are POP-Up and maximised on load-active-open.

    I like this appearance because I don't use the normal access menu's.

    Any other thoughts ..

  14. #14
    Lounger
    Join Date
    Nov 2001
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form focus (a2K)

    Private Sub Form_Resize()
    DoCmd.Maximize
    End Sub

  15. #15
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form focus (a2K)

    That seems to be working Rich.
    Thanks

Page 1 of 2 12 LastLast

Posting Permissions

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