=Nz(DLookUp("[UNIT]","[sor codes]","[SOR CODE]= [Forms]![Job Details Form]![job costs subform]![SOR CODE]"),"")
I have referenced the main form, then the subform.
WORKED!!!!:)
Many Many thanks
Many thanks for the response but it still does not work.
I have broken it down and
=Nz(DLookUp("[UNIT]","[sor codes]"))
Returns the first value from the correct table and field within the table. I just need the retrieve the correct value based on the Sor code that is selected in...
Hi,
Sorry I did not realise about caps.
I have tried
=DLookUp("[UNIT]","[SOR CODES]","[SOR CODE]='" & [SOR CODE] & "'")
but still get #error
is there anything else I am doing wrong?
many thanks for your help
I NEED HELP USING DLOOKUP ON A ACCESS SUBFORM.
IN THE SUBFORM I HAVE THE FOLLOWING:
SOR CODE (FIELD SAVED IN TABLE JOB COSTS)
UNIT (TEXT BOX)
RATE (TEXT BOX)
WORK DESC. (TEXT BOX)
WHEN THE SOR CODE IS ENTERED I NEED THE UNIT AND RATE TO POPULATE, BY LOOKING UP VALUES IN TABLE SOR CODES...