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

Dlookup runtime error '3075'

P: 46
I've been having issues with my dlookup. Could someone take a look at this one and let me know where I'm going wrong.



Expand|Select|Wrap|Line Numbers
  1. tasksE = Nz(DCount("[Task Number]", "Tasks", "To='" & Forms![Royal Crm]![Employee Name] & " and Complete=0"), 0)
Mar 14 '14 #1
Share this Question
Share on Google+
5 Replies


Rabbit
Expert Mod 10K+
P: 12,430
Please use code tags when posting code or formatted data.

You're missing a single quote to surround your employee name.
Mar 14 '14 #2

P: 46
When I put ' ' around Employee name, the code turns red
Expand|Select|Wrap|Line Numbers
  1. tasksE = Nz(DCount("[Task Number]", "Tasks", "To='" & Forms![Royal Crm]!'[Employee Name]' & " and Complete=0"), 0)
Mar 14 '14 #3

Rabbit
Expert Mod 10K+
P: 12,430
That's not what I meant. Look at your To='. You are missing the ending quote for it.
Mar 14 '14 #4

P: 46
Rabbit,

I really appreciate you help. I am having trouble understanding what you mean. Could you please show correction in code.
Mar 14 '14 #5

Rabbit
Expert Mod 10K+
P: 12,430
Right now your criteria looks like this to SQL:
Expand|Select|Wrap|Line Numbers
  1. To='bobby and Complete=0
It needs to look like this:
Expand|Select|Wrap|Line Numbers
  1. To='bobby' and Complete=0
Mar 14 '14 #6

Post your reply

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