Scrolling text question???? (1 Viewer)

dcarr

Trainee Database Analyst
Local time
Today, 23:28
Joined
Jun 19, 2002
Messages
112
I have a form that I would like to apply scrolling text to? The form is part of a piece of work I am assisting with my brother with? I would like the scrolling text to read 'Welcome to the main menu of Michaels gym, etc......', is there any easy way of integrating this into a form? Thanks
 

ColinEssex

Old registered user
Local time
Today, 23:28
Joined
Feb 22, 2002
Messages
9,118
Hi

Had you made a search, you would have found this. :rolleyes:

You can write a scrolling text box in access. To test this, make a blank form with a text box on it named TextBox.

100 seems to work pretty well for the TimerInterval.

Include the following code:

Option Compare Database
Option Explicit
Public Message As String

Private Sub Form_Open(Cancel As Integer)
Message = " Type your message here. If it is not longer than this text box, make sure you add additional spaces. "
End Sub

Private Sub Form_Timer()
TextBox = Message
'Get first character
Dim FChar As String
FChar = left(Message, 1)
'Remove first character
Message = Mid$(Message, 2, Len(Message) - 1)
'Put 1st character at the end of the message.
Message = Message + FChar
End Sub


This example was from a post by doulostheou - thanks to them for that - I only copied it.

Col
 

dcarr

Trainee Database Analyst
Local time
Today, 23:28
Joined
Jun 19, 2002
Messages
112
I have created a blank form and have copied the coade, as well as creating a text box and naming it TextBox, but it still does not seem to work? I am using Access 97? Thanks
 

R6Flyer

Yamaha hooligan
Local time
Today, 23:28
Joined
Nov 21, 2003
Messages
95
You will also need to set the timer interval as Col suggested. Start off with a value of 100 and experiment with different values to get the result you require.
 

ColinEssex

Old registered user
Local time
Today, 23:28
Joined
Feb 22, 2002
Messages
9,118
You have put the appropriate code in the OnOpen event and the OnTimer code in the OnTimer and set the TimerInterval at 100 and under the Option Explicit you have put "Public Message as String"?

It does work, trust me I'm a biker :D

Col
 

dcarr

Trainee Database Analyst
Local time
Today, 23:28
Joined
Jun 19, 2002
Messages
112
Thanks guys that worked.
 

ghudson

Registered User.
Local time
Today, 18:28
Joined
Jun 8, 2002
Messages
6,195
Ricky Hicks has a great sample db @ UtterAccess.com that shows how to have scrolling text "string" in a text box, label and the status bar. You have to be a member of UtterAccess [it is free] to access the Archive Samples section.

Here is the link to the Scrolling Text sample:
Scrolling Text Examples

Here is where you sign up to join UtterAccess:
UtterAccess Registration

Using Ricky's method, I posted a sample on how to use the contents of a table for scrolling on this forum here: scrollingmessageboard.zip

HTH
 

Sharkiness

Registered User.
Local time
Today, 23:28
Joined
Sep 25, 2008
Messages
31
Thanks for the solution it's working great horizontally.

Is there any way to have the marquee scrolling vertically?

Cheers
 

Users who are viewing this thread

Top Bottom