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

Form opens at bottom instead of top 1

Status
Not open for further replies.

FoxProProgrammer

Programmer
Apr 26, 2002
967
US
I created a Form that displays revision notes for a database. It has only labels and a button to close the form. The form has vertical scroll bars because it is too long (high) to fit on the screen. The close button is at the bottom of the form.

When the Form opens, the text at the bottom of the screen is visible. I want the form to open so the text at the top is visible. I presume that this is happening because the only control on the form is the button at the bottom. I added a control at the top and sure enough the form opens at the top. I don't have any use for this control other than to force the form to open at the top. When I set the Visible property of the control to No, the form opens at the bottom.

Is there a way around this?

Thanks,

dz
 
Open the form from design view. When it opens, scroll to the top of the form. Then click on save. Close the form.
Next time you open it the starting position ought to be (hopefully) saved.

Before you criticize someone, you should walk a mile in their shoes.
That way, when you criticize them, you're a mile away and you have their shoes.
 
Unfortunately neither of those two ideas work. I tried moving the page break around the Form. It opens at the bottom no matter where I move it.

Thanks for trying! Any other ideas?

dz
 
Would it suit to change the controls to Enabled Yes, Locked Yes?
 
G'day dz

You could add a textbox box at the top, eg "txtPlaceHolder". Enable Tab Stop, make it the first tab, set width=0, left=0, top=0, locked=true, enabled=true.

I use this textbox on almost all my forms so I have somewhere to set focus without the user seeing it. Handy when disabling/enabling controls in code, etc.

Max Hugen
Australia
 
BTW, how about moving your close button to the form footer, then it will always be visible?

Max Hugen
Australia
 
Thanks, Max! Both of your ideas worked. I decided to move the Close button to the footer instead of adding a control to the top of the screen.

G'day mate!

dz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top