I have a DLookup() function on one of my reports:
=DLookUp("[TaskStartDt]","tblDatesInfrastructureAndTools","[TaskID] = 52 And [ProjectID]=[Project_ID]")
I created a new text field and placed this function in it – this works very well.
After that I realized that I want to sort on that particular field and the only way to do it is to create a new field in my query, which the report is based on. The problem is that when I place this same statement in the query, it’s coming up with an error : Can’t find field Project_ID…or something like that.
Project_ID is in the query and ProjectID is in my other table – tblDatesInfrastructureAndTools.
I’m not sure what I’m doing wrong…could someone please help me out on this one?
I’m also attaching a screenshot of my report query.
Thanks.
=DLookUp("[TaskStartDt]","tblDatesInfrastructureAndTools","[TaskID] = 52 And [ProjectID]=[Project_ID]")
I created a new text field and placed this function in it – this works very well.
After that I realized that I want to sort on that particular field and the only way to do it is to create a new field in my query, which the report is based on. The problem is that when I place this same statement in the query, it’s coming up with an error : Can’t find field Project_ID…or something like that.
Project_ID is in the query and ProjectID is in my other table – tblDatesInfrastructureAndTools.
I’m not sure what I’m doing wrong…could someone please help me out on this one?
I’m also attaching a screenshot of my report query.
Thanks.