celosia
03-20-2002, 11:12 PM
hi..how to auto refresh the Form, when then form open?what i mean..when we open the form(run it) the all the input automatic clear after record(cmdSave)it and all the record go to queries right, then..i have try using Add new button but, what i need the form is auto refresh and the input Boxes is clear all box..when we run it..without delete all the previous record on the Queries.So any one can help..me. http://www.access-programmers.co.uk/ubb/frown.gif
Susilowati
03-21-2002, 06:43 PM
Hi,
What you can do is, use the Refresh method to update the records in the underlying table/query for the form whenever the form receives the focus:
Private Sub Form_Activate()
Me.Refresh
End Sub
otherwise try to do refresh everytime you move to next record or any other event as required.
cheers SS
jatherton99
03-21-2002, 09:20 PM
You can use the OnTimer event to auto refresh the forms. I used this in a HelpDesk application that I built in Access97 to refresh ticket tickets shown on intial screen. Hope this helps ya!
Set the value of your Timer Interval = 300000 (this equals 5 minutes) or whatever you want.
In code behind form ....
Public Sub Form_Timer()
AutoRefresh
End Sub
Public Function AutoRefresh()
Me.Refresh
End Function
Simply you are calling the AutoRefresh() when the timer reaches the limit you set. It refreshs the current form ("Me" being your current form)