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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open a form in custom window 2

Status
Not open for further replies.

MA04

Technical User
Dec 21, 2004
162
GB
Hi all,

I have a command button on one form: form1 that opens another: form2. Form1 opens in a maximized window, now i want form2 to open in a restore window i.e. which is the size of form2, but leave form1 in maximized window. Also is it possible for form2 to open up on the bottom right hand corner of the screen. This will then allow user to view both form1 and form2 in desired format.

Any help appreciated, thanks in advance,
M-.
 
Take a look at the MoveSize method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
form2
AutoResize = No
AutoCenter = No
BoarderStyle = Dialog
PopUp = Yes
Modal = No
OnOpen Event of the Form2
Code:
Private Sub Form_Open(Cancel As Integer)
    Me.Move 10000, 5000
End Sub
You may have to change the 10000,5000 according to your requirement.

________________________________________
Zameer Abdulla
Visit Me
The best thing to spend on your child is your time.
 
Thanks PHV and Zameer,

I tried to use moveSize previously could not get it to work, but when i entered Zameer's numbers 10000, 5000 to the movesize it worked. Problem i had with move size previously was i thought i had to enter all properties i.e DoCmd.MoveSize DoCmd.MoveSize 10000, 5000, , thought i had to deal with width and height also. Zameer could not get above Me.Move 10000, 5000 to work it through up error, but used DoCmd.Movesize 10000, 5000 instead did trick. Also turning forms pop up property to yes did the job of allowing form to be in restore window, Thank you,

M-.
 
I have tested it found working well then I posted. What error it was throwing?

________________________________________
Zameer Abdulla
Visit Me
The best thing to spend on your child is your time.
 
Hi Zameer,
I get error "compile error, Method or data member not found", it highlights .Move . Bare in mind that i am using Access 97 [ponder]. No problem though as MoveSize does do the trick.[thumbsup2]

M-.
 
I think .Move method available from Access2000 verstion. Thanks for notifying me.

________________________________________
Zameer Abdulla
Visit Me
The best thing to spend on your child is your time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top