Well, MikeisVFP
there are so mayn unknown to us, eg what the timer and how it is onvolved with "this.refrsh", what "this" is, and what happens in this.Refresh().
But if it's about the timer to be reactivated, AFTER the second form finishes, then thisform.timer1.Enabled = .t.
And if that causes problems, then you need to address them where they happen.
For example:
If activating the timer is not always a good thing, eg if there are no records in a grid, then make that depend on Reccoun(thisform.grid.recordsource)>0, or have code in the timer event depend on the reccount or any other conditions, that mus be present.
You should understand what modal form means. As your problem was, "how do I enable the timer once I am done entering information in form2", the answer is right after you return from that form2. And that's the next line.
Also, you didn't answer my in direct question, what the moment "once I am done entering information in form2" is. What is it?
If that moment occurs, WHILE form2 runs, then form2 needs to have a reference to form1, like you have using Mike Lewis' solution. And then you can enable the timer from the invoice form, no matter where exactly. That form then knows the other form. The disadvantage of that is, it will of course only work, if the second form would be called by the first form. You introduce a dependency this way.
Keep it simple. The moment you oform1.Show(1) &&show modally, the debugger will switch to that form init, go through all initialisation, the form will show, and finally the trace window goes back to the line oform1.Show(1) &&show modally, it won't go to the next line, unless the form you called finishes. Therefore the timer still is disabled all this time, until the form closes. Only then "this.refresh" runs, and the re-enabling of the timer. Only then, note before. That's what modal means.
If you still have a problem with refresh events, the grid erroring, then disabling the timer didn't help, you bark up the wrong tree. Find out where the problem really comes from. Perhaps your other form uses the default datasession, meaning the current datasession. And you influence workareas, wou should influence, and therefor your refresh or grid errors or misbehaves. Perhaps the solution is even simpler, and you only need to make the invoice form have it's own private datasession.
I have really no doubt, I have answered your question, adding that single line does enable the timer, after the other form finishes. If that doesn't solve your problem, it doesn't mean that line reactivates the timer too early. It means, that either re-enabling the timer after the other form finishes still is too early, or you have a totally different problem, eg finishing the other form, closes all workareas and tables. Or the timer is not at all involved in your problem, you only think it is.
Find out where the problem really is, and I'm sure we can solve that.
Bye, Olaf.