LOCAL lnRecCount, loAlias, loRecno m.loAlias = CREATEOBJECT("cusPushPopAlias") SELECT (thisform.iobomgr.oBO_Payment.oDS_Payments.icAlias) m.loRecNo = CREATEOBJECT("cusPushPopRecno") m.lnRecCount = RECCOUNT(thisform.iobomgr.oBO_Payment.oDS_Payments.icAlias) RELEASE m.loRecNo IF m.lnRecCount > 0 this.Enabled = .T. this.Value = c_payment.iPaymentId &&creceiptno ELSE this.Value = "" this.Enabled = .F. ENDIF RELEASE loAliasThe dropdown list is configured with these values:
Rowsource = "c_paymentslist.creceiptno,ipaymentid" RowSourceType = 6 && FieldsThe problem arises if I display one Invoice which has no receipt, then move to an invoice that has a receipt. One the invoice with no receipt, the dropdown's value is set to blank and then disabled. This is fine. When I move to the next Invoice which has a receipt, the dropdown is enabled and its value is set correctly, but the value displayed in the dropdown list is blank. It should be displaying the Receipt Number.