REfreshing the Form

celosia

Registered User.
Local time
Today, 07:28
Joined
Mar 17, 2002
Messages
12
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.
frown.gif
 
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
 
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)
 

Users who are viewing this thread

Back
Top Bottom