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

Hi All, I am newbie to MS Access

Status
Not open for further replies.

MaharajanM

Programmer
Oct 9, 2002
10
JP
Hi All,

I am newbie to MS Access and VBA.

I have creted a List Box and added items by below 3 lines,
Me.testList2.RowSourceType = "Value List"
Me.testList2.RowSource = "skddk fofdjfjd,fdfd dfdfdf;row2col1;row2col2222222222222222222222222222222222"
Me.testList2.Requery

But at runtime, the scrollbars are not displayed automatically. How can trigger this?

Thanks in advance for any related help,
Maharajan.
 
The VERTICAL scroll bar will only appear when you have enough items in the list to need it.

The HORIZONTAL scroll bar tries to work in a similar way, but it is far more dependent on the width of the last displayed column. ( .Column(1) in your case ).

Set the .ColumnWidths property to display the with of .Column(0) and .Column(1) that you want by editing the .ColumnWidths property in the form
4.6cm; 3.2cm

If the overall width of the two columns together exceeds what the list box thinks it needs then you'll get a horizontal scroll bar.

Play around with the numbers until you get the effect that you want.


'ope-that-'elps.
G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.

Please remember to give helpful posts the stars they deserve!
This makes the post more visible to others in need! :-D

 
Hi Again,

I got the scrollbar. Itz working fine. But i cud see only a part of value for column-0, when it have long strings.

Is there any property so i can set to calulate the column width depends on itz value string during runtime.

Maharajan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top