You have a lot of unnecessary concatenation in there. Try
TotalDebit = DSum("[AmountDebitFrom]", "Qry_TransactionsFullData", "[AccountID] = '" & txtAccountID & "' AND Val([RecordCode]) <= " & VRecordCode & " AND [TransactionTypeID]= 2)
If as you mentioned all criteria a text data types:
TotalDebit = DSum("[AmountDebitFrom]", "Qry_TransactionsFullData", "[AccountID] = '" & txtAccountID & "' AND Val([RecordCode]) <= '" & VRecordCode & "' AND [TransactionTypeID]= '2')
Paul
------ Original Message ------
From: "Youssef" <youssef2309@gmail.com>
Sent: 3/9/2022 9:37:30 AM
Subject: Re: [MSAccessProfessionals] Syntax error
Dear Mr. Paul,
thanks for your support
I've updated the syntax and still get the message (expected: list separator or ) )
I can't notice the mistake
please support again
TotalDebit = DSum("[AmountDebitFrom]", "Qry_TransactionsFullData", "[AccountID] = '" & txtAccountID & "'" & " AND Val([RecordCode]) <= " & VRecordCode & " AND [TransactionTypeID]= '" & 2 & "'" & ")thanks in advance
Tidak ada komentar:
Posting Komentar