Form moved too far down 'page'

pharrison

New member
Local time
Today, 01:19
Joined
Jul 13, 2006
Messages
6
I have no idea how this happened, but...

I have a form that I use as a switchboard for a database. It automatically opens whenever I open the database and contains various buttons that allow me to import new data, run reports etc.

It has somehow moved a long, long, long, long (you get the idea!) way down the 'page' - i.e. the scrollbar to the right of access is enormously long with this form at the bottom and enything else I open at the top. This means that whenever I use the database any other forms, reports etc that I open are so far up the page that I cannot see them. The only way to reach them is to maximize everything. However, this makes it difficult/impossible if I need to, for example, see the design of two queries at the same time.

I have spent half an hour slowly moving the form up the page manually, but I don't seem to getting anywhere. Is there anyway to return this form to the top of the access page?
 
Have you tried using the movesize in the on open event? You can use this to position a form relative to the top and left of the screen.
 
Thanks Keith,

Unfortunately, this only moved the form relative to the bottom of the ridiculously long page!

I used the following code:

Private Sub Form_Open(Cancel As Integer)

Form.Move Left:=100, Top:=100

End Sub

I have attached a screenshot.

Is my code wrong or do you have any other suggestions. Your help is very much appreciated :)
 

Attachments

  • Image00001.jpg
    Image00001.jpg
    50.2 KB · Views: 136
Also tried:

Private Sub Form_Open(Cancel As Integer)

DoCmd.MoveSize 100, 100

End Sub

With the same result.

The form is positions 100 pixels in and down from the top of the screen, but at the bottom of the access page (see scollbar in screenshot).
 
I think this must have been an Access glitch. The problem seems to have resolved itself.
 
pharrison said:
I think this must have been an Access glitch. The problem seems to have resolved itself.

pharison,

Glad it all worked out. As far as I can tell (I really am an amateur!) your code was ok. My only tip when weird things happen is to compact and repair. If they persist, create a new item and migrate the controls across 1 at a time until the problem re-appears or try commenting out sections of VBA if the problem could lie there.

Cheers,
 
OK, thanks for your help Keith - I will try the gradual migration if this ever happens again.
 

Users who are viewing this thread

Back
Top Bottom