Porgram window size

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can I set the program window size each time I start access? I want this to
be database specific.
 
Add the following declare statement to any standard module

Public Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal
hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long,
ByVal cy As Long, ByVal wFlags As Long) As Long

Then you can reposition the main window like this. See MSDN help for more
details. The second, hWndInsertAfter, and the last, uFlags parameters will
change the behavior of the function.

Sub SetAccessPosition()
SetWindowPos Application.hWndAccessApp, 0, 0, 0, 1000, 500, 0
End Sub
 

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

Back
Top