Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Min/Max -Form

Status
Not open for further replies.

rhonda11

Technical User
Nov 4, 2002
96
US
I have a main form (1st) that has a command button to open another form (2nd) for project lookup. The 1st form has a procedure to Maximize when opened. In the 2nd form when the user select the project from the combo box, the 1st form opened maximize with the desired record selected. However, when the user click on the command button to look for another project, the 1st form opened but did not maximize the form. How can I get the 1st form to maximize any time a record selected from the 2nd form. I know is kind of confusing, all I want is the 1st form to stay maximize whenever a record is selected from the 1st form.

Thanks in advance

Note: the 2nd form is not set to maximize.

 
see the post under:

Programmers > DBMS Packages > Microsoft: Access Forms Forum
WINDOW SIZE

by kuzz, the solution posted by CharlesCook (Programmer)

follows:


Dec 10, 2002
DoCmd.MoveSize
[, down][, width][, height]

NOTE:The units for the arguments are twips.

twip:
Unit of measurement used by Microsoft Access that is equal to 1/20 of a point, or 1/1440 of an inch. There are 567 twips in a centimeter.

/*** end of copy of CharlesCook's Post ***/

Hope this helps :)

Cruz'n and Booz'n always.
This post shows what little I do at work.​
 
Thanks, I've done the changes. However, I'm still at square 1. I have a lookup form which is the 2nd form. The form size is about the size of a pop dialog box. My problem is when I select the command button from the 1st form, which opens the 2nd form. Right away, the 1st form, which I can still see behind the 2nd form, changes the form size instead of remaining maximize. How can I have the 1st retain it's maximize size when the 2nd populates.

Thank you for your help.
 
my guess is put it in the "ONLOAD" part of your 2nd form :) not on the "onclick" action to open the form ;-) Cruz'n and Booz'n always.
This post shows what little I do at work.
 
if you're 2nd form happens to also be a subform of your mainform though, it'll cause problems...

:p Cruz'n and Booz'n always.
This post shows what little I do at work.
 
Sorry hwkranger, but it didn't work :-( And no, the 2nd form is not a subform. I don't understand why that the 1st form always decrease the form size when the 2nd form is active?
 
Hi,

At a guess, do you resize the 2nd form when you open (or some other event)? Your description suggests that you do - otherwise you wouldn't be able to navigate the way you have described.

Try opening the 2nd form as a dialog. Check for any resizing from load/current/open events on the 1st or 2nd form.

Cheers

Steve
 
The 2nd form is set to dialog, and there's no resizing from load/current/open event.
I thought of another way to get around it. When I click on the button from the 1st form to get to the 2nd form. How do I set an event procedure from the command button to also close the 1st form when the 2nd form open?
That way when I select the desired record from the 2nd form, the 1st form will open maximize becuase there's a procedure on open to maximize.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top