Sending text to a form object

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to send short status text lines to a form control that will
display to the user. There will be many texts sent to the object. what
control should I use for this? I would llike the messages to scroll off the
form? Im not sure how else to ask the question at this point.
 
faberk said:
I would like to send short status text lines to a form control that will
display to the user. There will be many texts sent to the object. what
control should I use for this? I would llike the messages to scroll off the
form? Im not sure how else to ask the question at this point.

Something like this ought to do it with a label:

Private Sub Form_Timer()
' Author: Arvin Meyer
' Comment: Set the TimerInterval property to about 150

Static strMsg As String, intLet As Integer, intLen As Integer
Dim strMsg As String
Dim strTmp As String
Const intLength = 40

' Fill strMsg with text
strMsg = "I want to know God's thoughts. The rest is merely details"

If Len(strMsg) = 0 Then
strMsg = Space(intLength) & strMsg & Space(intLength)
intLen = Len(strMsg)
End If
intLet = intLet + 1
If intLet > intLen Then intLet = 1
strTmp = Mid(strMsg, intLet, intLength)
Me!label36.Caption = strTmp

' Add this to immediately re-begin scroll of the text
If strTmp = Space(intLength) Then intLet = 1

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