Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Access Automation : Change application window size

I am using the following code to open an Access application object and load a mdb file. The code works fine. I want to be able to resize the application window to, say 800x600 pixels.
If I open an Excel application object I can use the aapp.Width and aapp.Height properties to do the job. It does not compile with the Access Application object.

Dim aapp As Access.Application
Set aapp = New Access.Application
aapp.OpenCurrentDatabase ("c:somedb.mdb")
aapp.Visible = True
aapp.DoCmd.RunCommand acCmdAppRestore

I am using VB 6.0, Office XP and have included the Microsoft Access 10.0 Object Library in the referenced dialog box.

Thanks
Vassilis G. Tavoultsidis

Comments

  • GogiGogi Member Posts: 258
    : I am using the following code to open an Access application object and load a mdb file. The code works fine. I want to be able to resize the application window to, say 800x600 pixels.
    : If I open an Excel application object I can use the aapp.Width and aapp.Height properties to do the job. It does not compile with the Access Application object.
    :
    : Dim aapp As Access.Application
    : Set aapp = New Access.Application
    : aapp.OpenCurrentDatabase ("c:somedb.mdb")
    : aapp.Visible = True
    : aapp.DoCmd.RunCommand acCmdAppRestore
    :
    : I am using VB 6.0, Office XP and have included the Microsoft Access 10.0 Object Library in the referenced dialog box.
    :
    : Thanks
    : Vassilis G. Tavoultsidis
    :


    Well,I never used Access automation,but maybe you can use SetWindowPos winapi function to set the position & size of your window.You can get window handle using FindWindow function.
Sign In or Register to comment.