A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Timed update of listbox



 
 
Thread Tools Display Modes
  #1  
Old January 3rd, 2007, 02:46 PM posted to microsoft.public.access.forms
tecman
external usenet poster
 
Posts: 5
Default Timed update of listbox

I have a listbox designed to show work orders. I would like this
listbox to refresh in the form every 10-15 seconds or so. Any help is
greatly appreciated.

  #2  
Old January 3rd, 2007, 03:18 PM posted to microsoft.public.access.forms
missinglinq via AccessMonster.com
external usenet poster
 
Posts: 545
Default Timed update of listbox

This should do it!

Private Sub Form_Load()
TimerInterval = 10000 'for 10 seconds...for 15 seconds use 15000
End Sub

Private Sub Form_Timer()
YourListbox.Refresh
End Sub



tecman wrote:
I have a listbox designed to show work orders. I would like this
listbox to refresh in the form every 10-15 seconds or so. Any help is
greatly appreciated.


--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via http://www.accessmonster.com

  #3  
Old January 3rd, 2007, 03:20 PM posted to microsoft.public.access.forms
Daniel
external usenet poster
 
Posts: 1,017
Default Timed update of listbox

You can use the timer event to do this. Why the need to refresh so often
though?

Daniel





"tecman" wrote:

I have a listbox designed to show work orders. I would like this
listbox to refresh in the form every 10-15 seconds or so. Any help is
greatly appreciated.


  #4  
Old January 3rd, 2007, 06:45 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Timed update of listbox

This solution will work. Here is an alternative that does the same thing.
Rather than hard code a value in the module, use the form's property sheet
to enter the timer interval. Also, it is always best to qualify references
to you objects:
rather than:
YourListbox.Refresh
Use:
Me.YourListbox.Requery
--
Dave Hargis, Microsoft Access MVP


"missinglinq via AccessMonster.com" wrote:

This should do it!

Private Sub Form_Load()
TimerInterval = 10000 'for 10 seconds...for 15 seconds use 15000
End Sub

Private Sub Form_Timer()
YourListbox.Refresh
End Sub



tecman wrote:
I have a listbox designed to show work orders. I would like this
listbox to refresh in the form every 10-15 seconds or so. Any help is
greatly appreciated.


--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via http://www.accessmonster.com


  #5  
Old January 3rd, 2007, 09:11 PM posted to microsoft.public.access.forms
missinglinq via AccessMonster.com
external usenet poster
 
Posts: 545
Default Timed update of listbox

Actually

YourListbox.Refresh

May need to be

YourListbox.Requery

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via http://www.accessmonster.com

  #6  
Old January 3rd, 2007, 11:09 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Timed update of listbox

This would certainly explain why cats always seem a bit nervous
--
Dave Hargis, Microsoft Access MVP


"missinglinq via AccessMonster.com" wrote:

Actually

YourListbox.Refresh

May need to be

YourListbox.Requery

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via http://www.accessmonster.com


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:22 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.