I created on the invoice form, a property runnedForm (value=.null.)
on the Save:
wait wind ISNULL(thisform.runnedForm)
IF ISNULL(thisform.runnedForm)
do form ledger with acct,acctid NAME thisform.runnedForm
ENDIF
But it is still loopin.
so I added
wait wind ISNULL(thisform.runnedForm)
to check, and thisform.runnedForm always .T.
am I missing something?
Thanks for the help
Jerry
>>I have two separate forms, one is invoice, one is ledger
>>
>>My client wants to join those forms into one, when he finishes entering the invoice, will auto-run the ledger form.
>>
>>On the invoice form, I added a command button, when click, it will run the ledger form, which works.
>>
>>But my client doesn't want to click the button.
>>
>>so on the invoice.save, I added:
>>do form ledger
>>
>>When I save the invoice, it will keep running the ledger form over and over.
>>How can I make it only runs once?
>>
>>Thanks for the help
>>
>>Jerry Yang
>
>Add a property in the Invoice form (i.e. runnedForm) with a default value NULL
>and then in Save:
>
>IF ISNULL(thisform.runnedForm)
> do form ledger NAME thisform.runnedForm
>ENDIF
>