Prev: Drag in a List Box
Next: Strange Lookupbox
From: babs on 25 Apr 2010 23:32 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 "Wayne-I-M" wrote: > 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 > > -- > Wayne > Manchester, England. > > > > "babs" wrote: > > > 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
From: John W. Vinson on 26 Apr 2010 00:38 On Sun, 25 Apr 2010 20:32:01 -0700, babs <babs(a)discussions.microsoft.com> wrote: >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. -- John W. Vinson [MVP]
From: babs on 26 Apr 2010 14:28 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 "John W. Vinson" wrote: > On Sun, 25 Apr 2010 20:32:01 -0700, babs <babs(a)discussions.microsoft.com> > wrote: > > >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. > -- > > John W. Vinson [MVP] > . >
From: John W. Vinson on 26 Apr 2010 15:28 On Mon, 26 Apr 2010 11:28:01 -0700, babs <babs(a)discussions.microsoft.com> wrote: >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! -- John W. Vinson [MVP]
From: babs on 26 Apr 2010 20:38
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 "John W. Vinson" wrote: > On Mon, 26 Apr 2010 11:28:01 -0700, babs <babs(a)discussions.microsoft.com> > wrote: > > >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! > > -- > > John W. Vinson [MVP] > . > |