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

Application window

Status
Not open for further replies.

lchase

Instructor
Aug 8, 2002
42
US
Can the access application window be resized from code. I have a small start up form and would like the window to just surround it rather than leaving a 4 inch gap.
Thanks Len
 
Set the size of your form and use
DoCmd.RunCommand (acCmdSizeToFitForm)
to automatically resize your form to fit.

 
I tried it but saw no results I ran the following code using an autoexec macro
What did I miss?
Thanks Len

Public Function Main()
DoCmd.OpenForm "incomingchecksandpayments"
DoCmd.RunCommand (acCmdSizeToFitForm)

End Function
 
I have a sample db set up that will completely hide the access window.....might work for you...send me an email and I will forward it to you.... Please remember to give helpful posts the stars they deserve!
This makes the post more visible to others in need! [thumbsup2]

Robert L. Johnson III, A+, Network+, MCP
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com
 
I think I had the syntax wrong. In your forms 'On Open' expression, paste this code:

Private Sub Form_Open(Cancel As Integer)
DoCmd.RunCommand acCmdSizeToFitForm
End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top