INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Minimizing a Maximized form and Making it Maximized again on restore.

Minimizing a Maximized form and Making it Maximized again on restore.

(OP)
I have a form "frmMenu" which contains a sub datasheet form called "frmDashBoard". This form opens Maximized. I have added the following code to re-query that sub data sheet as it is a live update screen.

Private Sub Form_Load()
Me.TimerInterval = 1
End Sub

Private Sub Form_Timer()
Forms![frmMenu].frmDashBoard.Form.Requery
End Sub

I have disabled this forms minimize. And I am trying to add a button to minimize all of access. And when its restored to restore "frmMenu" in maximize with the requery function also running. I have tried a few code options but can't seem to get what I am trying to achieve. Would appreciate some help on how I could get this done.

RE: Minimizing a Maximized form and Making it Maximized again on restore.

DoCmd.RunCommand acCmdAppMinimize 'Minimize the MS Access Application
DoCmd.RunCommand acCmdAppMaximize 'Maximize the MS Access Application
DoCmd.RunCommand acCmdAppRestore 'Restore the MS Access Application

copied from http://www.devhut.net/2011/02/15/ms-access-vba-min...
I hope that helps.

RE: Minimizing a Maximized form and Making it Maximized again on restore.

(OP)
I've tried that.. But because of the timer event being used for the requering.. I am not getting what I want.. I can minimize the screen and access fine.. but I can't seem to get the maximize on restore to work.. If I don't set the timer to Empty the form doesn't minimize. But when I do the requiring stops.. Is there a possibility to set the timer through a if function??

RE: Minimizing a Maximized form and Making it Maximized again on restore.

To be honest, am not really following your intent, here, but my medication load is pretty high, today! dazed

But this line

Me.TimerInterval = 1

seems suspect! A TimerInterval of 1000 fires every second...so a TimerInterval of 1 would fire every 1/1000 of a second! Not really sure the system can keep up with this or, more importantly, that the human eye can keep up with the results as displayed on the screen!

I'd try an Interval of 1000 (1 second) or, better yet, 5000, and see what happens.

Hope this helps!

There's always more than one way to skin a cat!

All posts/responses based on Access 2003/2007

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close