473,398 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

weird problem: form will not maximize

Hi,
I have an Access 2000 database with one main form in which all subforms
are embedded. In this form I have a timer which closes the form,
detaches the linked (ODBC) tables and reopens the same form with a
login dialog (initiated in onOpen).

When I open the application the form maximizes (as it should). But when
the code reopens the form, the form is not maximized. I have
DoCmd.Maximize in onOpen,onLoad,onActivate. What else can I try to get
this form open maximized?

The code I use to close and reopen the form is:

Sub IdleTimeDetected(ExpiredMinutes)
Dim frmName As String
frmName = "OpenForm"
DoCmd.Close acForm, frmName, acSaveYes
DisconnectTable ("") 'this detaches the linked tables
DoCmd.Maximize
DoCmd.OpenForm frmName 'here the form opens non-maximized
End Sub

Thanks for your help

Mar 23 '06 #1
2 3691
If you take a closer look at your last two lines of code, you are
trying to maximize the form before opening it. Reverse the order and
you should be fine.

Jason

insomniux wrote:
Hi,
I have an Access 2000 database with one main form in which all subforms
are embedded. In this form I have a timer which closes the form,
detaches the linked (ODBC) tables and reopens the same form with a
login dialog (initiated in onOpen).

When I open the application the form maximizes (as it should). But when
the code reopens the form, the form is not maximized. I have
DoCmd.Maximize in onOpen,onLoad,onActivate. What else can I try to get
this form open maximized?

The code I use to close and reopen the form is:

Sub IdleTimeDetected(ExpiredMinutes)
Dim frmName As String
frmName = "OpenForm"
DoCmd.Close acForm, frmName, acSaveYes
DisconnectTable ("") 'this detaches the linked tables
DoCmd.Maximize
DoCmd.OpenForm frmName 'here the form opens non-maximized
End Sub

Thanks for your help


Mar 23 '06 #2
Mmm....
You're right. But still it is odd. The form does not listen to the
maximize commands in the onOpen event.
My consideration to put the command before the DoCmd.OpenForm command
is that usually, if the database window is maximized, the forms open
maximized as well.
Anyway. Thanks for your tip. It solved my problem!

Mar 23 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Brian Keanie | last post by:
Thanks for last response. Same database ...... have a form and a subform. On the subform I have a button which opens another form to give info as to input. When I return to main form and subform...
7
by: Bhargavan | last post by:
Hey Group, When I minimize and then maximize a form (in windows application), I see a significant drop in memory usuage in the task manager. I tried to do the same thing programatically during the...
4
by: BradC | last post by:
I have an MDI parent application with several forms inside it. As the user switches between forms, I am forcing a maximize to keep it filling up the parent window. When the user has one...
4
by: kaosyeti | last post by:
what's the best way to get a form to always open at a specific size. i've sized and saved the forms, changed the borders and had popup on and off all over but can't seem to get it to stay one way...
13
by: John | last post by:
Hi, I have on form MenuBar, Toolbar, and Grid control. Form property is set to form opens as Maximized. Form maximizes through whole screen, but I don't see bottom part of grid, because...
5
by: Mrozu | last post by:
Hi When I maximize a form in VB.Net 2003 the bottom of the form gets hidden by the start bar (so my status bar is invisible). How can I get my app to maximize to the usable screen area above...
8
by: sara | last post by:
I have a report that runs fine with data. If there is no data, I have its NO Data event sending a MsgBox and cancelling the report. Then it seems I still get the 2501 message on the Open Report...
0
by: Miro | last post by:
Something I have run into using VB Express 2005 with mdi forms. I have not been able to re-create this but I'll let out the information on how I came about fixing this. As it cost me about 4...
4
by: =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= | last post by:
Hi, On a simple form, I have a ListBox control. This listbox control is loaded with around 800 text items of somewhat short length. There are also some other controls on the form, buttons. When...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.