Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing a sub form 1

Status
Not open for further replies.

Krash878

Programmer
May 8, 2001
172
0
0
US
Hey there everyone.

I have a form that has a sub form in it. The parent form has command buttons that open a new form and edit data in a table that the sub form gets from a query. What I need do is have the sub form refresh its query every 30 seconds or so.

I think I can set the from properties Timer Interval to 30 but I do not know what to say in On timer to make it refresh or re-query. Any help would be great?


Thanks

Ken
 
The Timer Interval property has to be set to milliseconds. So if you want a 30 second setting you have to set it to 30000.

Put the following code in the On Timer event procedure:
Code:
Me![[red]SubForControlName[/red]].requery

Replace the red code with the name of the subform control NOT the name of the subform itself.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top