UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Why Does My Second Form Open Maximised, Access 2016    
 
   
azizrasul
post Oct 23 2019, 05:11 AM
Post#1



Posts: 1,514
Joined: 18-July 00
From: Faisalabad, Pakistan


I have a MS Access 2002 database.

When the db opens it shows a Splash screen form (frmSplashScreen) which opens in the centre and is a popup. The Navigation Pane is hidden.

When I press a command button on frmSplashScreen to open another form (frmSelectFunction), frmSelectFunction opens up OK i.e. it's not maximised and is not a popup. When a command button button is pressed on frmSelectFunction another form (frmListLeaveApplications) opens in front of frmSelectFunction, which is what it's supposed to do. When frmListLeaveApplications is closed, frmSelectFunction reveals itself, hence the reson it can't be a popup.

However when migrating the MS Access 2002 database to MS Access 2016, frmSelectFunction opens up maximised? The code in the command button of frmSplashScreen is

CODE
                ' NORMAL CODE
                ' Open form to select function
                DoCmd.OpenForm "frmSelectFunction", acNormal
        
                ' Close Splash Form
                DoCmd.Close acForm, "frmSplashScreen", acSaveNo

I have even altered the sequence of this code by closing frmSplashScreen first and opening frmSelectFunction. No luck.

I have also tried

CODE
DoCmd.Restore

in the Load and Open events of frmSelectFunction. Still no luck.

--------------------
Aziz
Go to the top of the page
 
arnelgp
post Oct 23 2019, 05:40 AM
Post#2



Posts: 1,510
Joined: 2-April 09
From: somewhere out there...


check to see if there is a code in the Open/Load event of the
form that is causing it to maximized.

--------------------
Never stop learning, because life never stops teaching.
Go to the top of the page
 
azizrasul
post Oct 23 2019, 06:01 AM
Post#3



Posts: 1,514
Joined: 18-July 00
From: Faisalabad, Pakistan


Nothing like that and it has exactly the same code as the MS Access 2002 version had without any changes being made.

The only thing I added in frmSplashScreen in the Load event, which I have now commented out was:-

CODE
'    DoCmd.ShowToolbar "Ribbon", acToolbarNo
'
'    Call DoCmd.NavigateTo("acNavigationCategoryObjectType")
'    Call DoCmd.RunCommand(acCmdWindowHide)

It still doesn't work.

I have noticed that MS Access 2002 application window is not maximised when it opens so it works. In MS Access 2016 version the application window is maximised and that probably is why frmSelectFunction is maximising.

Is there a way of 'forcing' frmSelectFunction to open as a particulr size?

--------------------
Aziz
Go to the top of the page
 
arnelgp
post Oct 23 2019, 06:04 AM
Post#4



Posts: 1,510
Joined: 2-April 09
From: somewhere out there...


open the form in design view.
resize the form (as to make any changes).
save the form. close. run.

--------------------
Never stop learning, because life never stops teaching.
Go to the top of the page
 
azizrasul
post Oct 23 2019, 06:14 AM
Post#5



Posts: 1,514
Joined: 18-July 00
From: Faisalabad, Pakistan


Still didn't work. Please see attachment.
Attached File(s)
Attached File  Database1.zip ( 38.63K )Number of downloads: 7
 

--------------------
Aziz
Go to the top of the page
 
arnelgp
post Oct 23 2019, 06:21 AM
Post#6



Posts: 1,510
Joined: 2-April 09
From: somewhere out there...


on design view of the form, goto Property Sheet->Other->Pop up: Yes

--------------------
Never stop learning, because life never stops teaching.
Go to the top of the page
 
azizrasul
post Oct 23 2019, 06:22 AM
Post#7



Posts: 1,514
Joined: 18-July 00
From: Faisalabad, Pakistan


As I have said in my opening post, it can't be a popup. The reason is that it will be on top of another form which opens when a command button is pressed on frmSelectFunction.
This post has been edited by azizrasul: Oct 23 2019, 06:24 AM

--------------------
Aziz
Go to the top of the page
 
arnelgp
post Oct 23 2019, 06:29 AM
Post#8



Posts: 1,510
Joined: 2-April 09
From: somewhere out there...


maybe on Access Option->Current Database->Document Windows Option->Overlapping Windows.

--------------------
Never stop learning, because life never stops teaching.
Go to the top of the page
 
azizrasul
post Oct 23 2019, 06:56 AM
Post#9



Posts: 1,514
Joined: 18-July 00
From: Faisalabad, Pakistan


Fantastic, that did it. Much appreciated.

--------------------
Aziz
Go to the top of the page
 
azizrasul
post Oct 23 2019, 09:12 AM
Post#10



Posts: 1,514
Joined: 18-July 00
From: Faisalabad, Pakistan


Found that although this solves my specific problem, it produces problems elsewhere e.g. when right clicking on a form's title bar, the sub menu is behind the form. I have had to resort to what I had before now.

I placed

CODE
DoCmd.Restore

in the form's OnOpen event and it worked. But when I removed this line, it was still OK? Go figure.

But when I try to do the same thing in another form, it doesn't work at all. Arrrrgh.

It's a bit hit and miss. When I import another form into a new database, then the form opens OK without me adding any new code. But the same form in the original db maximises, no matter what I do. The only thing that I haven't done is SHOUT at the computer.
This post has been edited by azizrasul: Oct 23 2019, 09:30 AM

--------------------
Aziz
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    15th December 2019 - 10:09 AM