String values require delimiters around them:
Paul
------ Original Message ------
From: "Youssef" <youssef2309@gmail.com>
Sent: 3/9/2022 8:22:18 AM
Subject: [MSAccessProfessionals] Syntax error
Dear Colleagues,
I got the attached message for b/m function,
thanks to feedback with what mistake I did
Notes: for data types (RecordCode - AccountID - TransactionTypeID) all are string variablesPublic Function TotalDebitTillRecordCode(txtAccountID As Variant, txtRecordCode As Variant) As DoubleTotalDebitTillRecordCode = DSum("[AmountDebitFrom]", "Qry_TransactionsFullData", "[AccountID] like " & txtAccountID & " And Val([RecordCode]) <= " & txtRecordCode & " And [TransactionTypeID] =" & 2)End Function
Tidak ada komentar:
Posting Komentar