Rabu, 09 Maret 2022

Re: [MSAccessProfessionals] Syntax error

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 variables 
Public Function TotalDebitTillRecordCode(txtAccountID As Variant, txtRecordCode As Variant) As Double
TotalDebitTillRecordCode = DSum("[AmountDebitFrom]", "Qry_TransactionsFullData", "[AccountID] like " & txtAccountID & " And Val([RecordCode]) <= " & txtRecordCode & " And [TransactionTypeID] =" & 2)
End Function
 

Tidak ada komentar:

Posting Komentar