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

Recentering Forms

Status
Not open for further replies.

Hmadyson

Programmer
Mar 14, 2001
202
0
0
US
I have a form with a tab control. Within the first page of the tab control there is a subform. Every time the form opens, it moves the top of the subform to be the top of the form. I have subforms on the rest of the pages of the tab control. When I switch pages, it does not move the forms top to be the top of those subforms. Even if I switch so that the subform is in the middle of my page, each time I move off of that page and then move back on, it will again move the form so that the top of the subform is the top of the form.

What am I doing wrong, and how can I get the form to not recenter itself.
 
Try setting the subform's Autosize property to True in design view. Also go to the main form's design view and then go to the place where that subform is located on the tab and shrink the size of it. More than likely the size of your tabbed subform is too big and it's being maximized when you click on it.
 
When that happened to me, I at long last discovered that way below everything else in the sub form there was a text box that I had neglected somehow, and it didn't show in the window because it was too far below the rest of the form. When I removed it, and adjusted the length of the form, voila, no more problem. Just maybe...
 
Okay, sorry but none of your suggestions worked for me. Here is more information. The rest of my form contains many disabled controls. The subform on the tab control is virtually the only enabled control on the whole form. However, all of the controls on the subform are disabled. Even if I make the subform smaller than the screen, it still tries to put the left corner of the subform on the top of the screen. There are a lot of fields on the subform and there is no way that they will all fit in one view. Please help. I will try anything. I am thinking of resorting to an event macro that whenever that page of the tab control is clicked on, I will set the top and the left of the form.
 
Hi there

I'm having the exact same problem! :-( Does anybody know how to remedy this? How did you fix it Hmadyson?

Thanks

TheBlade
 
Wow, this one is a stumper. I've tried re-creating your problem, but the tab controls and subforms work fine for me. There must be some property that you changed that is causing this behaviour. It is going to take some detective work...

Do you remember when this behaviour began? Did it start right after you put your subform on the tab control? Did you change any properties on the subform? Have you tried to compare the properties of the wonky subform to the ones that work the right way?

Is there anything else unusual about this form?
 
Hi fwatanabe

The only difference between this form and the others, is that the subform on this particular page has 2 subforms within it (i.e. 2 subsubforms).

And it only happens when this when the fields in the subform of this tab control page are populated (i.e. when i'm adding a new record and all the fields are currently empty, the tab control page behaves fine, like the rest of the pages. But if I populate the fields of this particular subform, then goto the another page and then go back to this page again, it plays up!). I hope this makes sense...Please let me know if you'd like me to clarify anything.

I've checked the subform properties against the properties of the subforms on the other tab control pages and made them the same..but the problem still occurs.

I'm stumped, help! :(

TheBalde
 
Hi fwatanabe

The only difference between this form and the others, is that the subform on this particular page has 2 subforms within it (i.e. 2 subsubforms).

And it only happens when this when the fields in the subform of this tab control page are populated (i.e. when i'm adding a new record and all the fields are currently empty, the tab control page behaves fine, like the rest of the pages. But if I populate the fields of this particular subform, then goto the another page and then go back to this page again, it plays up!). I hope this makes sense...Please let me know if you'd like me to clarify anything.

I've checked the subform properties against the properties of the subforms on the other tab control pages and made them the same..but the problem still occurs.

I'm stumped, help! :-(

TheBalde
 
Solved it (thanks to Larry De Laruelle)..simple too, dang! Future ref for anyone else:
"I think we may be back to size. What is the height of the subform on the tab?

If it is larger than the available screen space, Access will scroll down automatically
on load (or so it seems to me).

If this is the problem, you will probably need to resize the subform to correct it."

cheers

TheBlade :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top