Dlookup Query

geoffcodd

Registered User.
Local time
Today, 01:43
Joined
Aug 25, 2002
Messages
87
I can't seem to get the following to work

=DLookUp("[RunningSum]","Central_Budget_Utilities_Data_(Comparrison)_Query2","[Utility_Type] = '" & [Reports]![Central_Budget_Comparrison_Sub-Report_(Table)]!Utility_Type & "') And [Month] = '& Format(DateAdd("yyyy",-1,Date()),"yyyymm") & '")

Any help would be appreciated

Thanks
Geoff
 
Just replying from a syntax point of view, you seem to have a few issues.

1 - You seem to have spaces around the table/query name of Central_Budget_Utilities_Data_(Comparrison)_Query2. Try removing them, unless you really named it with a space before and after.

2 - some other small syntax issues

Try the following:
=DLookUp("[RunningSum]","Central_Budget_Utilities_Data_(Comparrison)_Query" ,"[Utility_Type] = '" & [Reports]![Central_Budget_Comparrison_Sub-Report_(Table)]!Utility_Type & "') And [Month] = '" & Format(DateAdd("yyyy",-1,Date()),"yyyymm") & "'")
 

Users who are viewing this thread

Back
Top Bottom