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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make a form "REFRESH" into another form itself using a timer ?

Status
Not open for further replies.

e1k4l3cs

MIS
Nov 11, 2002
56
SG
How can I make a form refresh from formA to formB by setting a timer using a Timer event or something like that... Can I have a code example ???

Thanks...

Kelvin
 
There's probably a better way, but one way would be to put an application.ontime statement in the userform_activate handler, directing control to a public sub on the userform code page. This sub would close or hide the userform and show the other one. Any other mode of exit from the userform (e.g., clicking the OK button) should first clear the ontime event. A bit messy, but I think it would work.
Rob
[flowerface]
 
Not sure sure what you are looking for but try this


Private Sub Form_Timer()
DoCmd.Close acForm, "FormA"
DoCmd.OpenForm "FormB", acNormal, "", "", , acNormal
End Sub

On formA properties set the on timer event to [Event Procedure] and put in the required time in Timer Interval David Lerwill
"If at first you don't succeed go to the pub"
 
Ermmm...I think ur codes kind of bring me neare towards what I wants... Thx dwlerwill...

But as I am using MS Access... I uses VBA... N if I am not wrong, I can only have 1 timer attached to the form and I cannot fing a Timer object or something like that... I am using the one and only available timer for the clock running in my form already... Another problem I encounterd is that this code or yours:

DoCmd.OpenForm "FormB", acNormal, "", "", , acNormal

is prompting errors and I cannot really fire that code...

Thx a lot...

Kelvin
 
One more problem I have is that may I know if there is a need for me to do some linking to my forms ??? Coz the other form names are not displayed on the object combobox in any of the other forms...

Thx...

Kelvin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top