Display Scrollbar in Textbox

G

Greg

Hi, On a form I have a textbox that displays a memo field. The textbox has
the scroll bar property set to vertical. The form is for viewing records only
and no edits are allowed. All of the controls on the form have their property
Enabled = NO and Locked = Yes. However, when there is a large amount of text
in the text box displaying the memo field the vertical scroll bar does not
appear so all of the text cannot be read. If I make the text box property
Enabled = Yes the scroll bar appears when I click in the textbox but when I
move between records all the text in the memo field becomes selected and the
scroll bar remains visible. I assume the text box has the focus and keeps it.
Is there a way to remove the focus from the textbox but have the scroll bar
always visible? Or is there a better way to do this? Thanks
 
A

Arvin Meyer [MVP]

The textbox can be Locked and Enabled which will keep anyone from changing
any data. Go to Tools ... Options and click on the Keyboard tab. Change the
Behavior Entering Field to something other than selecting the entire field.
 
F

fredg

Thanks, That works well! Is it possible to set the focus to nowhere?

To nowhere? No! But you can set the focus to a different control when
you navigate to a different record.
Code the Form's Current event:
Me![OtherControlName].SetFocus
 
V

Van T. Dinh

Only if none of the Controls on the Form is enabled ... (AFAIK)

I normally create a TextBox txtDummy (Enabled / Visible / 0 width / 0 height
/ no border / transparent background / Tab Stop depending on usage) so it
can't hardly be seen and if I need the Focus to move away from other
Controls, I send the Focus to txtDummy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top