Information générale
Catégorie:
Codage, syntaxe et commandes
Cetin,
Here is the init code:
*******************************************
zap in cpayment
this.txtToday.value = date()
set procedure to lsfuncs additive
this.txtpay_acct.value = findacct()
this.txtpay_sub.value = findsub(this.txtpay_acct.value)
release procedure lsfuncs
if this.txtpay_acct.value = 0 or this.txtpay_sub.value = 0 then
this.grdnav.recordsource = space(0)
use in cpayment
thisform.dataenvironment.closetables
return .f.
endif
if this.txtpay_acct.value > 0 and this.txtpay_sub.value > 0 then
select student
set order to stu_acct
seek (str(this.txtpay_acct.value)+str(this.txtpay_sub.value))
this.txtpay_student.value = student.stu_student
select payment
set order to pay_acct
set filter to pay_acct = student.stu_acct and pay_sub = student.stu_sub
scan
select cpayment
append blank
replace cpay_pk with payment.pay_pk
replace cpay_schdate with payment.pay_schdate
replace cpay_lessdate with payment.pay_lessdate
replace cpay_paydate with payment.pay_paydate
replace cpay_flag with .f.
replace cpay_paid with payment.pay_amt
replace cpay_instamt with payment.pay_instamt
replace cpay_update with " "
replace cpay_updInstBal with .f.
select payment
endscan
select cpayment
set order to cpay_dte descending
endif
thisform.grdnav.setfocus()
*********************************************************
I'm not sure what you mean by form.de settings unless you mean DataSession is set to "2-Private data session"
>Paul,
>Couldn't create it happen. Could you pls paste form.de settings + init code.
>Cetin
>>Sorry to be such a pain...
>>
>>I now check to see if findacct returned a 0. if so:
>>
>>if this.txtAcct.value = 0 then
>> use in cpayment
>> thisform.dataenvironment.closetables
>> return .f.
>>endif
>>
>>Everything works except that the datasession still exists in the DataSession window. I can't figure out how to close or release this datasession.
>Snip...
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement