i have this code but the problem is it's still prompting me that "records already exist"... eventhough it is a new record...
WITH thisform
IF !EMPTY(.txtqty.value) .and. !EMPTY(ALLTRIM(.cbounit.value)) .and. !EMPTY(ALLTRIM(.cboarticle.value))
SCAN
IF ALLTRIM(unit) = ALLTRIM(.cbounit.value) AND ALLTRIM(article) = ALLTRIM(.cboarticle.value)
IF MESSAGEBOX("Unit "+ALLTRIM(unit)+" and "+ALLTRIM(article)+" already in the list. Do you want to edit?", 64+4, "Existing record...") = 6
LOCAL oQty as Form
DO FORM qtyForm NAME oQty WITH .txtqty.value, .cbounit.value, .cboarticle.value LINKED noshow
oQty.show(1)
ENDIF
EXIT
ENDIF
thisform.refresh()
TABLEUPDATE()
ENDSCAN
thisform.Release()
ELSE
MESSAGEBOX('Fill up necessary record(s)!')
ENDIF
WITH thisform
IF !EMPTY(.txtqty.value) .and. !EMPTY(ALLTRIM(.cbounit.value)) .and. !EMPTY(ALLTRIM(.cboarticle.value))
SCAN
IF ALLTRIM(unit) = ALLTRIM(.cbounit.value) AND ALLTRIM(article) = ALLTRIM(.cboarticle.value)
IF MESSAGEBOX("Unit "+ALLTRIM(unit)+" and "+ALLTRIM(article)+" already in the list. Do you want to edit?", 64+4, "Existing record...") = 6
LOCAL oQty as Form
DO FORM qtyForm NAME oQty WITH .txtqty.value, .cbounit.value, .cboarticle.value LINKED noshow
oQty.show(1)
ENDIF
EXIT
ENDIF
thisform.refresh()
TABLEUPDATE()
ENDSCAN
thisform.Release()
ELSE
MESSAGEBOX('Fill up necessary record(s)!')
ENDIF