Turn textbox scrollbar on if text length is greater than x

  • Thread starter Thread starter Guest
  • Start date Start date
try something like this:
after the buttun click:

'***********************
if len([your textbox])>300 then
[yourtextbox].ScrollBars = 2
end if
'***********************

Harm Ozinga
 
I doubt whether you'll get a .NET code snippet to work in Access without
loading the CLR and setting references. Try this:

If Len(Me.txtMyText) > 300 Then
Me.txtMyText.ScrollBars = 2
Else
Me.txtMyText.ScrollBars = 0
End If

The scroll bars won't show until the textbox gets focus, so you may want to
run the code in the GotFocus event.

Stephen Lebans may have a better answer:

http://www.lebans.com/DownloadFiles/CustomScrollBarVer8.zip

--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top