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

Scroll to Bottom of Textbox

Status
Not open for further replies.

Ed2020

Programmer
Nov 12, 2001
1,899
0
0
GB
Hi,

I have a routine that runs on the startup of my system. It runs through all linked tables in the database and checks to ensure the links are valid.

On my startup form I have a textbox that lists the current table that the system is checking and whether or not the test was successful:

Me.txtCurrProc = Me.txtCurrProc & vbCrLf & "Testing " & tbl.Name & " connection."
Me.Repaint

Me.txtCurrProc = Me.txtCurrProc & vbCrLf & tbl.Name & " - connection test passed."
Me.Repaint

As the list of tables is quite length the textbox does not have enough rows to display all the tables so I have allowed vertical scrollbars. However the textbox remains at the top of the list throughout the whole routine. Is there anyway of forcing it to scroll down to the bottom? I'm sure I've seen it done before, but I can't remember how.....

TIA,

Ed Metcalfe.



Please do not feed the trolls.....
 
Hey,
Try properties for the text box and allow vertical scrollbar.
Hope this helps.
Wendell
 
Wendell,

This allows the user to manually scroll down, but doesn't automtically keep scrolling down in code.

Thanks anyway.

Ed Metcalfe.

Please do not feed the trolls.....
 
Ed:

I am an exception kinda guy and would offer this - only report the table that fails.

If you still want to be cute then you could create a string and populate a list box. If you are using code then:

Dim strStatus As String

strStatus = tbl.Name & " - connection test passed."

go to your next table

strStatus = strStatus & ";" & tbl.Name & " - connection test passed."

etc to the end.

Use a 2 column listbox and set the rowsource type to "value list"

set the rowsource to Me.YourListbox.Rowsource = strStatus

The example and code is a little rough but the concept should work.

HTH

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top