Requery recordset of subforms (1 Viewer)

DS

Registered User.
Local time
Today, 13:02
Joined
Oct 5, 2000
Messages
12
I have a form, with 3 subforms on it. These subforms simply display a number of records based on a query set in the subforms recordsource property.

What I want to do is automatically display the latest records in the subforms at regular intervals without user interaction. What I did was issue the following commands in the timer event for the main form:-

me.subform1.requery
me.subform2.requery
me.subform3.requery

and set the timer interval to the required interval.

When I load the form, the records appear correctly, then the timer event gets executed (I stepped thru the code to make sure), but the subforms do not display the latest set of data. I have to unload and reload the main form to get the latest data.

Am I doing something wrong or can anyone think of another way of doing this.

Thanks in advance
DS
 

KevinM

Registered User.
Local time
Today, 13:02
Joined
Jun 15, 2000
Messages
719
Try...

Forms!MainForm!SubForm1.Refresh

OR

Forms!MainForm!SubForm1.Form.Refresh


etc

hth
 

DS

Registered User.
Local time
Today, 13:02
Joined
Oct 5, 2000
Messages
12
tried that, doesn't work....refresh simply updates and data that has altered, not add/remove records that match the query.


I have also tried setting the timer and event property of the sub-forms and running them as individual forms....still no joy....so problem not to do with the fact they are subforms

Thanks
DS
 

Users who are viewing this thread

Top Bottom