how to add scroll bar to a form

darbid

Registered User.
Local time
Today, 01:07
Joined
Jun 26, 2008
Messages
1,428
how to add scroll bar to a form[solved]

I have a problem with screen resolutions.

I have made my forms for a resolution with a width of 1024 which is our standard monitor resolution.

But the laptop screen resolution is less. (usage is an exception to the rule but possible) so I want to deal with it.

I have found out how to get the current screen resolution from windows.

When this resolution is less than 1024 I want to add a scroll bar to the bottom of my form so that they can scroll and see the whole form.

I tried to add "Horizontal Only" in the forms "scroll bars" property, but that did not work. I really thought this would. Is this right? if it is what could be preventing it from working.

Can someone please help.
 
Last edited:
Try with form properties SCROLL BARS
 
Hi
For horizontal scrollbars...

Me.ScrollBars = 1

Vertical:
Me.ScrollBars = 2

Both:
Me.ScrollBars = 3

None:
Me.ScrollBars = 0

hth
Chris
 
You can avoid the code and just adjust the form properties in design mode. Set scroll bars to 'both'.

If your form is set to pop-up or modal you will not be able to use a scroll bar.

For your horizontal scrollbar problem, this might offer some insight:

http://support.microsoft.com/kb/311888


This is also true for Access '07 (just tested).

-dK
 
Thanks guys - I was testing by changing it in design mode which for whatever reason did not work.

Then I tried to change the forms property in code and it worked. Great.

Thank you.
 

Users who are viewing this thread

Back
Top Bottom