syntax error in my dlookup inside qry

penwood

Registered User.
Local time
Today, 02:01
Joined
Nov 26, 2005
Messages
51
I wonder if you can help me. In my query, for this calculated field, i get an error message about a syntax error missing operator in query expression.
what did i do wrong? thanks

FormulaID is a text field.

UnitRM Combined: nz(DLookUp("UnitRM Combined","QryFormulaSummed","[QryFormulaSummed].[FormulaID]='" & tblCostJunction.FormulaID & "'"))
 
Try this:

UnitRM Combined: nz(DLookUp("UnitRM Combined","QryFormulaSummed","[FormulaID]='" & FormulaID & "'"))
 
what did i do wrong? thanks

FormulaID is a text field.

UnitRM Combined: nz(DLookUp("UnitRM Combined","QryFormulaSummed","[QryFormulaSummed].[FormulaID]='" & tblCostJunction.FormulaID & "'"))
Aren't there supposed to be brackets around the field name with this function???
Code:
nz(DLookUp("[size=5][b][color=red][[/size][/color][/b]UnitRM Combined[size=5][b][color=red]][/size][/b][/color]","QryFormulaSummed",
   "[QryFormulaSummed].[FormulaID]='" & tblCostJunction.FormulaID & "'"))
 
Aren't there supposed to be brackets around the field name with this function???
Code:
nz(DLookUp("[size=4][color=red][[/size][/color]UnitRM Combined[size=4][color=red]][/size][/color]","QryFormulaSummed",
   "[QryFormulaSummed].[FormulaID]='" & tblCostJunction.FormulaID & "'"))

Yep, good catch Adam.
 
It works nicely

Thank you so much. I was stressing out. This works better than ever before. regards, Penwood. Now i can go xmas shop.
 

Users who are viewing this thread

Back
Top Bottom