我有两个 MySQL 表,
tblloan注册表
LoanID EMPNumber Date Amount Status
1 1111 2012-10-01 50000 0
2 2222 2012-10-10 10000 1
tblLoanAccount
ID LoanID Date Payment Interest Total Auto Installment
1 1 2012-10-25 5000 0 5000 0 1
2 1 2012-11-01 0 100 100 1 0
3 1 2012-11-25 5000 100 5100 0 2
4 2 2012-11-25 1500 0 1500 0 1
成员 1111 的输出:
Date Description Principle Interest Balance
2012-10-25 Installment: 1 5000 0 45000
2012-11-01 Interest 0 100 45100
2012-11-25 Installment: 2 5000 100 40000
我尝试了以下方法,但它显示错误。
SELECT tblLoanAccount.Date, tblLoanAccount.Payment, tblLoanAccount.Interest,
tblLoanAccount.Total, tblLoanAccount.Auto, tblLoanAccount.Installment FROM " &
"tblLoanAccount WHERE tblLoanAccount.EMPNumber=" & cmbEMPNumber.Text & " AND
tblLoanAccount.LoanID = '1' AND tblLoanAccount.Total <> 0 ORDER BY tblLoanAccount.ID
错误: