Question : Ms Access 2000 Forms Moving, Resizing

Sometimes, especially when opening a form from a 'main form' when I close the new form, the original or main form changes to a slightly different location on the screen and doesn’t have min and max buttons or any other menus associated with the original form. If I then go to form design and maximise the form and go back to normal, then the form reverts to its original size. I have played with various options in an endeavour to standardize my forms so they all open to my required size and position but have been unsuccessful. Can anyone advise me if there is a way to absolutely control the opening and closing of forms either using (or not using) movesize or some other method that brings predetermined results each and every time. I am not averse to purchasing a third party product if such a product exists.

Answer : Ms Access 2000 Forms Moving, Resizing

You can specify the form size and position in the on open event using the following code.

Private Sub Form_OnOpen


Me.Height = 123
Me.Width = 456
Me.Top=789
Me.Left=101

End Sub

However, just saving the form normally does the job. I have never had to use these codes. What I'd suggest is that you do a compress and repair on your database. Then create a blank database and import you current database into it. Compress and repair the newly created database.

Open the forms in design view and make sure that the detail area is not bigger than the actual form area. Once you are happen with that open it in form view. Click F12 to save the form. That should work without the need of codes

Random Solutions  
 
programming4us programming4us