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,o nActivate. What else can I try to get
this form open maximized?
The code I use to close and reopen the form is:
Sub IdleTimeDetecte d(ExpiredMinute s)
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 2 3707
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,o nActivate. What else can I try to get this form open maximized?
The code I use to close and reopen the form is:
Sub IdleTimeDetecte d(ExpiredMinute s) 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
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! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 the entire form is distorted and shrunk in size. To
return it to proper size need to put it into design view and maximise it.
Any thoughts?
Regards
|
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 form load event, but I don't see any
significant drop in memory usage. Anybody know why?
Thanks,
Bhargavan
|
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 particular form displayed, sometimes the screen really
gets messed up.
It gets into this weird mode where the child form is still maximized inside
the parent, but it only takes up half the window! The bottom half is gray,
and only the top half shows the...
|
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 permanently. here's what i
basically have now:
1 form with 5 buttons to launch other forms. this launcher form will go .
visible=false and .visible=true when the other forms open and close. it is
not editable in any way, popup=no, modal=no,...
|
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 TaskBar (of Windows) is above grid. Why form maximizes below
Taskbar?
How to maximize form so that form is resized to Taskbar, but not further,
because bottom part of form will be below Taskbar?
| |
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 the start bar?
Thx Mrozu
|
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 command,
even though I have the code to trap Err 2501 (from many postings - all
looked the same to me) on the button the user pressed to get the
report.
I never see the code going to my error handling on the button. If I
debug, I am in an...
|
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 hours last night so it
might be a good read for anyone who uses mdi's.
1. I have Parent form that is an MDI conatainer. On the top of the form I
have a panel docked, and on the left hand side of the form I have a panel
docked with a splitter....
|
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 the form need to repaint itself
after e.g. maximize, it happens somewhat slow, I can see the buttons redrawn
one by one. I realy do not understand why. If I load twice the amount of text
into the list control, the form repaint itself twice as...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |