By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,863 Members | 853 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,863 IT Pros & Developers. It's quick & easy.

Operand without Operator error in conditional DLookup

P: 1
I am trying to use the below statement to derive only the count for Over Budget
=DLookUp("[CountOfMonthly Completion Status]","[Query13 Monthly Project Completion Status]","[Monthly Completion Status] Like """ & Over Budget & """")

[CountOfMonthly Completion Status]-is the value field
]","[Query13 Monthly Project Completion Status] -is the name of the query
It runs FINE till here.
But, when I include or try to include only those value where we have "Over Budget" as the text in Query column [Monthly Completion Status], it starts giving me the error -The expression you entered contains Invalid syntax. You have entered an operand without an operator"
Oct 13 '17 #1
Share this Question
Share on Google+
2 Replies


PhilOfWalton
Expert 100+
P: 1,430
Try
Expand|Select|Wrap|Line Numbers
  1. "[Monthly Completion Status] = Chr$(34) & "Over Budget" & Chr$(34))
  2.  
or
Expand|Select|Wrap|Line Numbers
  1. "[Monthly Completion Status] Like Chr$(34) & "*Over Budget*" & Chr$(34))
  2.  
Phil
Oct 13 '17 #2

PhilOfWalton
Expert 100+
P: 1,430
Whoops Typo error
Expand|Select|Wrap|Line Numbers
  1. "[Monthly Completion Status] = " & Chr$(34) & "Over Budget" & Chr$(34))
  2.  
or
Expand|Select|Wrap|Line Numbers
  1. "[Monthly Completion Status] Like " &  Chr$(34) & "*Over Budget*" & Chr$(34))
  2.  
Phil
Oct 13 '17 #3

Post your reply

Sign in to post your reply or Sign up for a free account.