Tab Control not visible on Form Open

jeffm3434

Registered User.
Local time
Today, 18:35
Joined
Dec 2, 2005
Messages
21
I've searched this forum and have been reading for over 2 hours now and still can't find an answer to this (although I have learned a bunch of other stuff :) ). So I appoligize if this have been answered before...

When I open my form my tab control is off screen (above the current view). I can use the slider on the left to move back up to the top of the form and see them... but why can't I make this happen automatically. This happens because one of my tabs is quite long (has several sub-forms on it). I even tried putting an empty label box above the tab control but it doesn't seem to help. I've turned off the Auto-Center and the Auto-Resize for the form. I can't find anything that helps.

Any idea? Please help.
Thanks,
Jeff
 
Why, I don't know, but to cure the problem:

Create a visible text box, named TxtHoldfocus, with its Left, Width and Height properties each set to 0". Then on the form's, ONOpen event execute

docmd.maximize 'if you want to maximize the Access window
Forms!YourformsName!txtHoldfocus.Setfocus = True
docmd.Movesize 0,0

This will cause form to be positioned in the upper left corner of the Access window. Adjust the MoveSize arguments (rasters, not inches [there are 1440 rasters per inch]) to meet your specific needs for the Acces Window position. Optionally use the Maximize.
 
Thanks...

All I needed was the "SetFocus"
The "MoveSize" is for moving the entire window and so does not apply here and maximize didn't solve it either.

I did make the blank text box and put it on the form above the tabcontrol in the detail section and then I move the tabs back up over top of the text box. I also set the text box to locked just so that no typing would go into that field. Then I did as you said and put the code in the "OnOpen" Event:

Forms!Clients!txtHoldfocus.Setfocus

(Clients is my Form name and actually I couldn't use the last part " = True"... that gives an error.)

Anyway... THANKS FOR THE HELP!!!! It is now working right. :)
 
Sorry, my mistake. The "= True" was not needed.
 

Users who are viewing this thread

Back
Top Bottom