Hi All,
I am trying to get the following DLookup function to work, but it's not happy:
I have a form (MAIN), based on the table (COMMISSIONING). The form contains a simple lookup to a field (GPCODE) in a second table (GENERALPRACTITIONERS). I would like my DLookup control to return a text field (PCTDESC) from the (GENERALPRACTITIONERS) table based on the current selection in the (MAIN) form for the (GPCODE) field.
The syntax I am using is as follows;
but this is returning only #Name? in the control.
Can anyone help please? Thanks in advance.
Jon
I am trying to get the following DLookup function to work, but it's not happy:
I have a form (MAIN), based on the table (COMMISSIONING). The form contains a simple lookup to a field (GPCODE) in a second table (GENERALPRACTITIONERS). I would like my DLookup control to return a text field (PCTDESC) from the (GENERALPRACTITIONERS) table based on the current selection in the (MAIN) form for the (GPCODE) field.
The syntax I am using is as follows;
Code:
=DLookUp("[PCTDesc]","GeneralPractitioners","[GPCode] =" & [Me]![GPCode])
but this is returning only #Name? in the control.
Can anyone help please? Thanks in advance.
Jon