Display text on a form random in a specific time range

Tiprof

Member
Local time
Today, 17:33
Joined
Apr 29, 2022
Messages
43
I have a database that displays text on a form when the form is loaded. It has a table that contains all the text to be displayed on the form.
I will like the text to change by itself in a particular time. Say, after every 5 minutes, the text should randomly change to a new one on the form.

Below is a sample of my database for analysis
 

Attachments

You can use the Timer event in conjunction with the Timer Interval property to display a different text on your form.
 
You can use the Timer event in conjunction with the Timer Interval property to display a different text on your form.
I added the code to the timer
But it didn’t work
That’s why I had to post it here for suggestions
 
I added the code to the timer
But it didn’t work
That’s why I had to post it here for suggestions
I'll take a look. What does "didn't work" mean? Did you get an error message?
 
It didn’t update after a period of time
It just displays the first text and that still remains
I see. That's because you don't have the code to change the text in the Timer event. I see you already have a timer to scroll the headers. How often do you want to see the text change?
 
For now, I modified your db to show a different text every 2 seconds, just to demonstrate...
 

Attachments

Last edited:
For now, I modified your db to show a different text every 2 seconds, just to demonstrate...
Your code worked perfectly.
I didn’t change anything except the time which I changed to 45 seconds.

Thanks so much for your efforts and time
I really appreciate
 
Your code worked perfectly.
I didn’t change anything except the time which I changed to 45 seconds.

Thanks so much for your efforts and time
I really appreciate
Glad to hear it worked for you. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom