0

I have the error #Name? in a form in Access 2013 in a textbox that have as origin a DlookUp function. Specifically I need to do the same thing that is on this topic: automatically update the field Costo Unitario field based on the selection of the field Operatore

enter image description here

The combobox of the Operatore field takes the values from a table named Operatori that it is like that:

Operatore        CostoOp_Unitario
---------        --------
Marco             20,07
Giuseppe          20,02
Gennaro           19,69
Pierangelo        17,05

The function that is set up as Control Source for the textbox that gives the #Name? error is:

=DLookUp([CostoOp_Unitario];[Operatori];"[Operatore]=""" & [OperatoreComboBox].[Text] & """")

based on the function that is present in the thread that I linked above. OperatoreComboBox is the combobox Operatore in the image. Why it outputs this error?

Community
  • 1
  • 1
Ponzaro
  • 139
  • 2
  • 5
  • 16

1 Answers1

2

I think your syntax is not correct. Try this one:

=DLookUp("[CostoOp_Unitario]","Operatori","[Operatore] = '" & [OperatoreComboBox] & "'")
mdialogo
  • 463
  • 8
  • 15