H
HJLatorre
Guest
I thought I understood Dlookup – but I am not able to make it work!
Here’s my scenario:
tbl_Details (GroupID, and other misc fields)
tbl_GroupList (AutoKey, GroupID, GroupName)
rpt_Report (GroupID, and other misc fields)
I would like my report to show the GroupName instead of GroupID (Data is entered as GroupID – hence, I created the look-up table “tbl_GroupList.”
I created a text box on my report:
=DLookup(“[GroupName]”,”[tbl_GroupList]”,”[GroupID] = Reports![rpt_Report]![GroupID]
I think my syntax is correct – I just can’t figure out why it won’t work. Do I need to link the tables?
I even tried DLookup in a query (changing the above code to fit the query fields) and can’t seem to make it work. Please help!
PS -- I don't think it matters, but I am trying to do this in a sub report.
Here’s my scenario:
tbl_Details (GroupID, and other misc fields)
tbl_GroupList (AutoKey, GroupID, GroupName)
rpt_Report (GroupID, and other misc fields)
I would like my report to show the GroupName instead of GroupID (Data is entered as GroupID – hence, I created the look-up table “tbl_GroupList.”
I created a text box on my report:
=DLookup(“[GroupName]”,”[tbl_GroupList]”,”[GroupID] = Reports![rpt_Report]![GroupID]
I think my syntax is correct – I just can’t figure out why it won’t work. Do I need to link the tables?
I even tried DLookup in a query (changing the above code to fit the query fields) and can’t seem to make it work. Please help!
PS -- I don't think it matters, but I am trying to do this in a sub report.