textbox automaticly scroll down to the last line

Robo0502

Registered User.
Local time
Today, 08:04
Joined
May 22, 2015
Messages
23
Hi all

I have a textbox on continues form which contains multiple lines and I d like to set it up so it ll be scrolled down completely when it displays the form. I ve already found a few so called solutions but nothing worked for me.

could you help me with it?

thanks
 
Look into trhe .SelStart property of the textbox - it might work for a continuous form when set in the OnCurrent event.

If your text consists of comments, consider inserting them in inverse chronological sequence instead - last comment first.
 
spikepl, thank you for your idea but unfortunately it doesn't work on a continuous form.
 
You may have to call a set focus in the onCurrent before you set its .SelStart to the length of its value.
 
Note that once the textbox loses focus it will revert back to its original position (i.e. the top).

The only real solution for retaining the position even after it's lost focus is by embedding the textbox in a subform and placing this subform on the form, but because you're using a continuous form you can't embed a subform in it.

So you have two options:
1. Do what spikepl advised - i.e. changing the order of your text
2. Use the subform method but have it in the Footer or Header section and synch the value with the current record value.
 
That is what I was about to reply. When it loses focus it will revert back.

I ll present possible solutions to users and they ll decide.
Anyway thank you guys.
 

Users who are viewing this thread

Back
Top Bottom