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

DoCmd.Maximize not working. I'm out of ideas. Please Help!!!

Status
Not open for further replies.
Jan 22, 2001
124
US
I have DoCmd.Maximize on the Form_Open event as well as the Form_Activate event of the form. The form maximizes correctly if I don't hide the dbase window.

As soon as I hide the dbase window using:

ChangeProperty "StartupShowDBWindow", dbBoolean, False

the form is not maximized when it again receives the focus. I really need some ideas. This is driving me crazy, because this has worked for me in the past. Thanks in advance for your help.

--Rob
 
Rob,

What about hiding the database window first and then maximizing the form?

Always include the code you're running for the most accurate help.

Jeremy =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995

Take a look at the Developer's section of the site for some helpful fundamentals.
 
Thanks for the response Jeremy. I hide the dbase window while the dbase in production. When it's not in production (I'm doing testing or development) the dbase window is not hidden. When the window is not hidden, the maximization works just fine. Here is the function call I forgot to include in my original post:

Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
Dim dbs As Database, prp As Property
Const conPropNotFoundError = 3270

Set dbs = CurrentDb
On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True

Change_Bye:
Exit Function

Change_Err:
If Err = conPropNotFoundError Then ' Property not found.
Set prp = dbs.CreateProperty(strPropName, _
varPropType, varPropValue)
dbs.Properties.Append prp
Resume Next
Else
' Unknown error.
ChangeProperty = False
Resume Change_Bye
End If
End Function
 
Hmm. I have to say, I don't know. I have no problem getting forms to maximize when I've got the database window hidden. Odd.

Jeremy =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995

Take a look at the Developer's section of the site for some helpful fundamentals.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top