473,748 Members | 2,563 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form Refuses To Maximize

25 New Member
Hi Everyone!
I have a form that opens from a another form set as a dialog box via a command button. I have tried about everything I can think of to make this form maximize when it opens.
I've used the
dcmd.maximize
in the "on open" and "on load" event procedures of the form. Also tried using it in the code of the command button that opens the form. Nothing seems to force this pesky thing to maximize.
What am I doing wrong?
Here's the code from the command button that calls the form:
Expand|Select|Wrap|Line Numbers
  1. Dim WClause
  2.     WClause = "[Date] Between #" & _
  3.     Me![Start] & "# and #" & _
  4.     Me![End] & "# and [Entered By] = '" & [Combo0] & "'"
  5.     DoCmd.OpenForm FormName:="NameFindForm", _
  6.     whereCondition:=WClause    
  7.  
  8.     DoCmd.RunMacro "Close Dialog1 form"
Is there a property setting on the form itself that might keep it from maximizing?
Thanks for any help!
Jan 6 '07 #1
13 6209
nico5038
3,080 Recognized Expert Specialist
I use always in the OnActivate event of the form the docmd.maximize command and that's working for me.

Nic;o)
Jan 6 '07 #2
missinglinq
3,532 Recognized Expert Specialist
Other than not opening maximized, is the form behaving as intended?
Jan 6 '07 #3
ADezii
8,834 Recognized Expert Expert
Hi Everyone!
I have a form that opens from a another form set as a dialog box via a command button. I have tried about everything I can think of to make this form maximize when it opens.
I've used the
dcmd.maximize
in the "on open" and "on load" event procedures of the form. Also tried using it in the code of the command button that opens the form. Nothing seems to force this pesky thing to maximize.
What am I doing wrong?
Here's the code from the command button that calls the form:
Expand|Select|Wrap|Line Numbers
  1. Dim WClause
  2.     WClause = "[Date] Between #" & _
  3.     Me![Start] & "# and #" & _
  4.     Me![End] & "# and [Entered By] = '" & [Combo0] & "'"
  5.     DoCmd.OpenForm FormName:="NameFindForm", _
  6.     whereCondition:=WClause    
  7.  
  8.     DoCmd.RunMacro "Close Dialog1 form"
Is there a property setting on the form itself that might keep it from maximizing?
Thanks for any help!
You stated that you could not Maximize your Form in the OnOpen and OnLoad Events using dcmd.maximize. The correct syntax is:
DoCmd.Maximize and it will work in a Form's Open() Event.
Jan 6 '07 #4
missinglinq
3,532 Recognized Expert Specialist
I assumed that was a typo in the posting, as it would raise a syntax error if it appeared that way actual code. I've tried to reproduce the problem using a variety of forms and a variety of settings and combinations thereof and cannot do so. The usual problem we hear is just the opposite: once one form is maximized they all want to be big! I went trolling on some other sites and one suggestion I saw was placing the code in the form's Activate Event. Probably worth a try, and only take a few seconds.

To be honest, my first thought when simple things start acting strange, odd or curious is corruption. I'd try the old routine of:

Make a blank db
Import everything from the old db into the new one
Delete the old one and rename the new one
Jan 6 '07 #5
Killer42
8,435 Recognized Expert Expert
I find myself wondering whether it's possible this could be due to some setting or combination of them in...
  • Border type
  • Pop up
  • Auto Resize
  • Auto center
Jan 6 '07 #6
nico5038
3,080 Recognized Expert Specialist
I have bad experiences with "Modal" "Popup" forms, as they tend to not trigger some events when being closed.
I stopped using these properties different as their initail setting.

When a "default" form doesn't react I would tend to think that your Office installation got corrupted and it might help to reinstall Office.

Nic;o)
Jan 6 '07 #7
missinglinq
3,532 Recognized Expert Specialist
It being a slow evening here in Lake Woebegone, I took your suggestion and have run thru permutaions of the properties you mentioed as well as Allow Design Changes and even whether the Min/Max button was set, all without any joy. Of course, after running them all, I had to give myself a dope slap; forgot that I had to exit Access completely between each attempt, otherwise, as I myself mentioned earlier, once a form is maximized every form opened thereafter will be maximized, even if it's the same form and the code to maximize has been removed! Ran all the permutations again, closing between each attempt, still without any joy!

Can't help but notice that while we've been trying to find a solution the original poster hasn't responded to any of our comments, suggestions or requests for information. I'm going to hang it up for the evening and go have a pint. Perhaps I'll find some inspiration there!
Jan 7 '07 #8
NeoPa
32,571 Recognized Expert Moderator MVP
Hi Everyone!
I have a form that opens from a another form set as a dialog box via a command button. I have tried about everything I can think of to make this form maximize when it opens.
I've used the
dcmd.maximize
in the "on open" and "on load" event procedures of the form. Also tried using it in the code of the command button that opens the form. Nothing seems to force this pesky thing to maximize.
What am I doing wrong?
Here's the code from the command button that calls the form:
Expand|Select|Wrap|Line Numbers
  1. Dim WClause
  2.     WClause = "[Date] Between #" & _
  3.     Me![Start] & "# and #" & _
  4.     Me![End] & "# and [Entered By] = '" & [Combo0] & "'"
  5.     DoCmd.OpenForm FormName:="NameFindForm", _
  6.     whereCondition:=WClause    
  7.  
  8.     DoCmd.RunMacro "Close Dialog1 form"
Is there a property setting on the form itself that might keep it from maximizing?
Thanks for any help!
The form is set as a Dialog Box?
Pop Up & Modal properties set to Yes?
In that case I don't believe Maximizing is supported for that type of form at all.
Jan 7 '07 #9
Killer42
8,435 Recognized Expert Expert
The form is set as a Dialog Box?
Pop Up & Modal properties set to Yes?
In that case I don't believe Maximizing is supported for that type of form at all.
Does that mean I was right? :)
Jan 8 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1865
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
3
4713
by: What-a-Tool | last post by:
I have a main form that is my start-up form. I want this form to be maximized all the time, so in the code for Form_Load I have DoCMD.Maximize. However, as soon as I open another form that is not maximized, this Main form loses its maximized state and the forms kinda Tile themselves. Any suggestions as to how I can keep this form maximized all the time? Anyone know of a way that I can get the size of the application display area so my...
7
4034
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
1
2641
by: Brandon | last post by:
Hello there. I'm currently working on a moderately complex Visual C# windows application that I have run into a bit of a problem on. To start things off, the application has normally been run under Windows XP with the theme mode set to Windows Classic (disabling the newer XP theme) at a resolution of 1280 x 1024 on a dual monitor system. The application has two sizes; one is roughly 800 x 600, and the second is full maximize mode. It...
4
3100
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,...
3
24376
by: jerry.ranch | last post by:
Hi I'm trying to figure out how to center forms on a page I have a form built with some tabbed pages, and I'm playing with the form properties, but it always displays top and left and not centered Thanks Jerry
2
3707
by: insomniux | last post by:
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...
5
3204
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
1
2343
by: neeraj | last post by:
Hi people's I developed one MDI application with one MDI form and 2 child forms, form. Border style of first child forms set as Fixed3D and Window State set as normal (like dialog Box) and maximize button set false minimize button set false. My first child form name like FrmClient I have one another child form which Form Border Style property set as Fixed3D and
0
8996
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, 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...
0
8832
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,...
0
9562
Oralloy
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...
0
9386
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 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...
1
9333
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6799
isladogs
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...
0
6078
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();...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.