i am trying to show a customer debth only if field in the table is "Not Paid"
i tried some codes cant figure this one alone
complicated syntax for me
any help will be appriciated
regards salsa31
i tried some codes cant figure this one alone
Code:
1) first Code
'Set rs = CN.Execute("SELECT * FROM Orders WHERE OrdBizStore= '" & FrmCusts.LsVw.SelectedItem.Text & "'")
'While Not rs.EOF
'If rs!OrdStatus = "Not Paid" Then
' TxtDebt.Text = FormatCurrency(rs!OrdPrice)
' rs.MoveNext
' Wend
2) Second Code (it shows me the total of the payments not the Debts(if he has)
Set rs = CN.Execute("select OrdPrice,OrdStatus from Orders where OrdBizStore = '" & RplS(FrmCusts.LsVw.SelectedItem.Text) & "'")
If rs.EOF Then
TxtDebt.Text = "0"
Else
TxtDebt.Text = FormatCurrency(rs!OrdPrice)
End If
any help will be appriciated
regards salsa31