Vertical Scrollbar position

Nona

New member
Local time
Today, 02:01
Joined
Oct 28, 2007
Messages
3
Hi,

I have searched in the topics but couldn't find any answer for my question. If anybody can help me, I'll be very thankfull. Is there any way to force the vertical scrollbar in a listbox to always appear in the bottom? I need to see the last records in the listbox.

Thanks in advance!
 
Below is what MS help has. I was unable to follow their directions. They did not have any example that you could use as a model. Unfortunately I have to go now.
---------------------------------------------------------------------------------

ScrollBarAlign Property

Language-specific information

You can use the ScrollBarAlign to specify or determine the alignment of a vertical scroll bar.

Setting

The ScrollBarAlign property uses the following settings.

Setting Visual Basic Description
System 0 Vertical scroll bar is placed on the left if the form or report Orientation property is right to left; and on the right if the form or report Orientation property is left to right.
Right 1 Aligns vertical scroll bar on the right side of the control.
Left 2 Aligns vertical scroll bar on the left side of the control.


You can set this property by using the property sheet or Visual Basic.

Remarks

For combo and list boxes, ScrollBarAlign also controls the placement of the box button above the scroll bar.

For more information about right-to-left properties, see Learn more about right-to-left properties in Microsoft Access 2000.
 
One way you might be able to goto the last record:

In the forms load event

Dim i As Long

i = Me.listboxname.ListCount

Me.listboxname.Selected(i - 1) = True

Dave
 
Ortaias, thank you for your reply but the quoted MS help didn't help me.

Dave, thank you for the code. I tried it, the last record in the listbox got selected, but it still shows the first records and I have to scroll down to see the highlighted last one.

Probably I have to sort the data from the listbox in an array, so the last record will go to the first position and it will be visible. If anybody knows another way, please help.

Thank you.
 
Probably I have to sort the data from the listbox in an array.

If you look at the Row Source property of the list box, if you click in the field, a little box with 3 dots will show. If you click on the button, the query builder will open and allow you to sort the data how you like.

Dave
 
Code:
Ortaias, thank you for your reply but the quoted MS help didn't help me.
As I noted in my earlier response, it didn't help me either. I played around with it and attempted further searches, but nothing came up.
 
If you look at the Row Source property of the list box, if you click in the field, a little box with 3 dots will show. If you click on the button, the query builder will open and allow you to sort the data how you like.

Dave,
it would work that way if the listbox was bounded to a query. My listbox is unbounded, the Row Source Type property is "Value List" and the 3 dots don't appear in the Row Sorce property.. I add new records to the listbox by choosing date frames from the form, but my picky client doesn't want to scroll down to see the last record.
Thank you.
 
I add new records to the listbox by choosing date frames from the form, but my picky client doesn't want to scroll down to see the last record.

How is the Value list constructed? Can you manipulate the data when adding to have the record they want to view first at the top?
 
Hi All,

Adding to an old thread here, but I need some help. I have a 4'' high text box, which has been formatting to Memo because entries exceed 255 characters. By default, with or without focus, this text box displays the TOP of the contents. However, if you type more than 4'' worth of text (say 20''), the user can't read the latest comments. So it would be GREAT if I could Bottom Align the text box like one can in Excel. Then, one would have to scroll up to read historical comments, but would immediately be able to read the latest.

Side note: I can't add a time stamp field to my note entries due to constraints I can't go into here. I have to keep just one long Memo field. Bottom Alignment possible? VBA code?
 
Hi all, posting to an old thread but hoping someone can help.

I have one large text box formatted to Memo so users can keep logs/notes of certain accounts. The notes aren't time stamped with [Note Date] and [Note Entry] (which would have been a good idea, but we're 10 years too late for that). Given just a 4'' high text box on a form, once the user inputs more than 4'' worth, the vertical scroll bar kicks in. This is great to get the bottom of the notes (also could hit F2 twice), but I would like the Default Alignment of the field to be set to Bottom (just like Excel cells can be bottom aligned). This way the user can read the latest 4'' worth of notes instead of scrolling down each and every time.

If excel can do it, I've been presuming Access can somehow (perhaps VBA?) as well. Can anyone help me set this Memo Text field to have bottom alignment?
 
oldsoftboss is right

sort the query that generates the listbox in the reverse order to what you currently do - then the most recent items should be at the top, rather than the bottom
 
Nealp

To display the last four lines of text, try putting this in on Form Load Event:

Application.SetOption "Behavior Entering Field", 2
'Select Entire Field - 0
'Go to Start of Field - 1
'Go to End of Field - 2

Then SetFocus to the field
 

Users who are viewing this thread

Back
Top Bottom