I have 1 form that 1 want to refresh the subform based on certain interval.
I have set at the form open procedure to set the time interval as 1 second
Me.TimerInterval = 1000
I have also set at the form properties the timer interval as 1000 .
In the ontimer event procedure, I hv copied the exact code as in execute button. It should execute the same task as when I click the execute button (which is working), but however, does not in the ontimer event procedure .
Private Sub Form_Timer()
'same command as in execute button
end sub
I hv to click the execute button to refresh the data for the subform.
If checkdata.Value = True Then
Me!Frm2_View.Form.RecordSource = "Select * from table_a where
table_a.DateTime_Start >= [forms]![Form1]![txtstartdate]; "
end if
The code above is just an example, mine is a bit longer, but almost similar. however, the txtstartdate fields and the rest are all filled up when I wait for the timer interval to execute .
Did I miss anything?
Appreciate the feedbacks..
thanks
I have set at the form open procedure to set the time interval as 1 second
Me.TimerInterval = 1000
I have also set at the form properties the timer interval as 1000 .
In the ontimer event procedure, I hv copied the exact code as in execute button. It should execute the same task as when I click the execute button (which is working), but however, does not in the ontimer event procedure .
Private Sub Form_Timer()
'same command as in execute button
end sub
I hv to click the execute button to refresh the data for the subform.
If checkdata.Value = True Then
Me!Frm2_View.Form.RecordSource = "Select * from table_a where
table_a.DateTime_Start >= [forms]![Form1]![txtstartdate]; "
end if
The code above is just an example, mine is a bit longer, but almost similar. however, the txtstartdate fields and the rest are all filled up when I wait for the timer interval to execute .
Did I miss anything?
Appreciate the feedbacks..
thanks
Last edited: