How do you prevent multiple instances of a form? I've tried the method suggested in message #2630 and this works for a form based on cBizObjForm. Once I put a cBizObj on the form, the whole thing stops working. What I've experienced is that I still get to instantiate a form multiple times and I can't close the form. Here's the code I've put in the Init method of the form:
LOCAL loForm
IF NOT This.lAllowMultipleInstances loForm = goApp.oForms.Get(This.Class)
IF TYPE('loForm') == 'O' loForm.Show() RETURN .F. ENDIF ENDIF
DODEFAULT()
Any suggestions? ©2002 Jun M. Ramoneda |