Matt Brown
Registered User.
- Local time
- Today, 08:58
- Joined
- Jun 5, 2000
- Messages
- 120
Hi all,
I need some really quick help here:
Can anyone see any problem with the following:
SQL = _
"SELECT trans00.SUPP_CUST, trans00.PART, trans00.MFTR, trans00.TRANS_QTY," & _
"trans00.TRANS_DATE, trans00.SELL_PR " & _
"FROM trans00" & _
" where PART = '" & AktProductNo & "' " & _
" AND SUPP_CUST = '" & rs1!CustomerNo & "' " & _
" AND trans_date IN (SELECT MAX(TRANS_DATE) FROM trans00 WHERE PART = '" & AktProductNo & "' and SUPP_CUST = " & rs1!CustomerNo & ") "
The problem is the nested query line, it returns a "Too few parameters expected" error.
I have looked at the parameters and cannot see why its doing this.
One thing is the max transdate is not returning anything, is my syntax wrong?
Any ideas anyone, please.
Matt
I need some really quick help here:
Can anyone see any problem with the following:
SQL = _
"SELECT trans00.SUPP_CUST, trans00.PART, trans00.MFTR, trans00.TRANS_QTY," & _
"trans00.TRANS_DATE, trans00.SELL_PR " & _
"FROM trans00" & _
" where PART = '" & AktProductNo & "' " & _
" AND SUPP_CUST = '" & rs1!CustomerNo & "' " & _
" AND trans_date IN (SELECT MAX(TRANS_DATE) FROM trans00 WHERE PART = '" & AktProductNo & "' and SUPP_CUST = " & rs1!CustomerNo & ") "
The problem is the nested query line, it returns a "Too few parameters expected" error.
I have looked at the parameters and cannot see why its doing this.
One thing is the max transdate is not returning anything, is my syntax wrong?

Any ideas anyone, please.
Matt
Last edited: