trying to open two forms on maximized other usually max. but small

B

babs

below is the code i have tied to the on click event of a command button

both forms normally open in Max. mode - when open individually
But for when I click on this command button would like the second form that
is listed(doesn't even seem to be opening with below) would like it to open
up in bottom of screen and the bottm part of the form to be displayed ON the
Maximized view of the 1st listed form

tried MoveSize and getting errors - tried looking it up on vb help and keeps
taking me to macros

Private Sub Command3_Click()
On Error GoTo Err_Command3_Click

Dim stDocName As String
Dim stLinkCriteria As String
Dim stDocName2 As String
Dim stLinkCriteria2 As String

stDocName = "JeffMainGenerate"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Maximize


stDocName2 = "Jeff Employee Info with Sched using for weekend"
DoCmd.OpenForm stDocName, , , stLinkCriteria2
DoCmd.Restore



Exit_Command3_Click:
Exit Sub

Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click

End Sub

thanks,
barb
 
W

Wayne-I-M

Hi
try this

Open both your forms in design view and set the PopUp to Yes. Mondal to No.
Then open both form in normal view and possition each (after this press
Control S). Or you could just set the form's size (drag the borders) in
design view until you're happy with them.

Now try running your code again like this

Private Sub Button_Click()
DoCmd.OpenForm "Form1", acNormal, "", "", , acNormal
DoCmd.OpenForm "Form2", acNormal, "", "", , acNormal
End Sub
 
B

babs

When I open just form 2 I want it to open up maximized and just by itself.

when I open form 1 I want form 2 to be smaller down near botton and showing
a table near the lower part of the form2(but on top of form 1)

when I did the below that you suggested both form 1 and 2 open when I click
on the command button but both open maximized - even when I resized and hit
control S - not sure what I am missing??

thanks,
Barb
 
J

John W. Vinson

When I open just form 2 I want it to open up maximized and just by itself.

when I open form 1 I want form 2 to be smaller down near botton and showing
a table near the lower part of the form2(but on top of form 1)

when I did the below that you suggested both form 1 and 2 open when I click
on the command button but both open maximized - even when I resized and hit
control S - not sure what I am missing??

If you open any form maximized, all other forms will open maximized as well.

You can overcome this by using Me.Restore in the Open event of the form that
you don't want maximized.
 
B

babs

The problem is - when I open the Form 2 by itself with command button to Open
THAT FORM - I would like it to open maximized

When I open Form 1 I would like Form 2 and only the bottonm section of it to
open on Top Form 1.(which would be tied to a command button- not clear on
exact code on how to open two form layered with one command button)

Sooo if I set the on open event of Form 2 to max. it will be good for 1st
situation But do not know how to handle having form 2 open on top of form
1(which I want form 1 max.)

thanks soo much for your help,
Barb
 
J

John W. Vinson

The problem is - when I open the Form 2 by itself with command button to Open
THAT FORM - I would like it to open maximized

When I open Form 1 I would like Form 2 and only the bottonm section of it to
open on Top Form 1.(which would be tied to a command button- not clear on
exact code on how to open two form layered with one command button)

Sooo if I set the on open event of Form 2 to max. it will be good for 1st
situation But do not know how to handle having form 2 open on top of form
1(which I want form 1 max.)

Other than making Form 2 a Subform of Form 1, I don't know any way to do so.
Doesn't mean there is no way, but nothing comes to mind!
 
B

babs

Making it a subform doesn't work for me - because - I have a dropdownlist on
it that has all kind of code tied to it that makes the employee list be up to
date as to who is scheduled for a job(if schedule for a given date-on the
active form) than their name is removed from the dropdown list. The
reference for the Form would be different if it is on as a subform -

Any other ideas?????

Thanks,
Barb
 
J

John W. Vinson

Making it a subform doesn't work for me - because - I have a dropdownlist on
it that has all kind of code tied to it that makes the employee list be up to
date as to who is scheduled for a job(if schedule for a given date-on the
active form) than their name is removed from the dropdown list. The
reference for the Form would be different if it is on as a subform -

Any other ideas?????

You want a maximized form.

You don't want it to fill the screen because you also want to see another
form.

Those two requirements are contradictory and incompatible.

Sorry!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top