Hello:
I have this function in Access VB:It executes OK, but when replacing 1049523 as the criteria value with the variable eid,Code:Public Function JumbulaTotals() Dim db As Database Dim rs As Recordset Dim eid As Long Dim strSql As String Dim amountdue As Long Dim amountpaid As Long eid = 1049523 amountdue = DSum("[Order amount]", "Jumbula", _ "[MemberID_1] =1049523") Debug.Print "Order amount = " & amountdue
I getCode:"[MemberID_1] = eid")
run-time error '2471'"
The expression you entered as a query parameter produced this error:
'eid'
Obviously, it's a syntax error but I've tried many additions of brackets and punctuation with no success.
Groan!