Simple Scroll Bar Question (1 Viewer)

asulliva

Registered User.
Local time
Today, 10:21
Joined
Jul 15, 2008
Messages
19
When I open my Access form, the scroll bar thumb is positioned about 30% across the scroll bar. I want it to be positioned to the far left of the bar when the form opens. I have tried looking through the properties, but maybe this is something that has to be coded in an event procedure when the form opens or loads. How can this be done?

Also, is there a way to "freeze" colums on an Access form like in Excel where the "frozen" columns stay in the form regardless of how far the user scrolls to the right?
 

FoFa

Registered User.
Local time
Today, 12:21
Joined
Jan 29, 2003
Messages
3,672
I am going to guess whatever control has the focus when the form opens, is off to the side causing the scroll bar to be placed like that. Change the INDEX property of each control to properly reflect the order the controls should be accessed.

No FREEZE command that I am aware of in forms.
 

asulliva

Registered User.
Local time
Today, 10:21
Joined
Jul 15, 2008
Messages
19
By INDEX do you mean Tab Index or is there another property called "index"?

I only ask because I don't currently have the computer the database is on near me.
 
Local time
Today, 12:21
Joined
Mar 4, 2008
Messages
3,856
Initially when I saw your second question, I was like, yeah, cool, that'd be great. So I waited to see if some genius out there would give a mystical answer.

Then I got to thinking about it. Yes, Access has a way of doing this, but you have to leave the spreadsheet paradigm completely for it to work.

Essentially, your main form is "frozen". It will not scroll when the sub-form scrolls. In fact, you can have sub-forms related to sub-forms and only the one you want to scroll will scroll. That is much more powerful than Excel's freeze feature.

Double in fact, normally my tables are so "narrow" that there are typically no scroll bars on my forms.

The unfortunate thing is that people don't leave the spreadsheet paradigm when they create their wide, un-normalized tables. Then people inherit the (I can't think of a nice word to call it) trash and have to do all kinds of work-arounds, including thinking you need to freeze columns in a view.

The distinguished gentleman from Texas already gave you the answer. There is no freeze command.

If you need help normalizing your database so you don't need the freeze functionality, let us know.
 
Local time
Today, 12:21
Joined
Mar 4, 2008
Messages
3,856
Yes, he meant the "Tab Index" property. Set the control in the upper left of your form to the first number (0).
 

asulliva

Registered User.
Local time
Today, 10:21
Joined
Jul 15, 2008
Messages
19
Well I can't alter the form too much because I'm just helping a coworker from another department who is totally computer illiterate. Although, I am pretty computer literate, I've really never worked with Access. If the solution is semi-simple and the risk of screwing anything up is low, I guess I can toy around with it. I am interested in the sub-form of a subform idea. Are you suggesting that I place a sub form with the two columns the co-worker wants frozen next to the existing form and resize the width of the existing form?

Also, while I'm here, I may aswell ask what the coding would be to set the height of the form on open/load event. I didn't see a height property in the properties list for the form.
 
Local time
Today, 12:21
Joined
Mar 4, 2008
Messages
3,856
Well I can't alter the form too much because I'm just helping a coworker from another department who is totally computer illiterate. Although, I am pretty computer literate, I've really never worked with Access. If the solution is semi-simple and the risk of screwing anything up is low, I guess I can toy around with it.

I understand...frustrating isn't it?

I am interested in the sub-form of a subform idea. Are you suggesting that I place a sub form with the two columns the co-worker wants frozen next to the existing form and resize the width of the existing form?

Sounds like it might be risky in your situation. You essentially have to "give up" spreadsheet view if you put a subform on a subform. Also, it requires that your data be normalized, which I'm guessing is not true.

Also, while I'm here, I may aswell ask what the coding would be to set the height of the form on open/load event. I didn't see a height property in the properties list for the form.

This is tricky. Do you mean a sub-form or the main form?

If a sub-form, you have to select the subform's "container" in order to get to the "Height" property. Right click toward the outer edge of the subform's border to get to the subform's container.

Get the name of the container from the properties sheet and you can set the Height in the subform's On Open event.
 

asulliva

Registered User.
Local time
Today, 10:21
Joined
Jul 15, 2008
Messages
19
This is tricky. Do you mean a sub-form or the main form?

If a sub-form, you have to select the subform's "container" in order to get to the "Height" property. Right click toward the outer edge of the subform's border to get to the subform's container.

Get the name of the container from the properties sheet and you can set the Height in the subform's On Open event.

It's the main form I'm looking to resize. Like the overall container which houses the spreadhseet subform and the input text fields, add button, etc.

What's the code to set the height and is the value I'm setting it to in pixels?

I'm assuming it's something like Me.Height = 300
 

FoFa

Registered User.
Local time
Today, 12:21
Joined
Jan 29, 2003
Messages
3,672
There is not a FORM height. Form height is Form header height, + form detail height + form footer height.

Look at the individual sections to adjust the height.
 

asulliva

Registered User.
Local time
Today, 10:21
Joined
Jul 15, 2008
Messages
19
Okay that makes sense.

What's the code I need to put in the controls' open events?
 

FoFa

Registered User.
Local time
Today, 12:21
Joined
Jan 29, 2003
Messages
3,672
me.SectionName.Height

Section names DEFAULT are FormHeader, FormFooter, Detail.
If you rename them than use that section name.
My Access 2003 displays the height in inches for each section.
 

Users who are viewing this thread

Top Bottom