473,320 Members | 2,164 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Dlookup runtime error '3075'

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
5 1619
Rabbit
12,516 Expert Mod 8TB
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
Vasago
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
12,516 Expert Mod 8TB
That's not what I meant. Look at your To='. You are missing the ending quote for it.
Mar 14 '14 #4
Vasago
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
12,516 Expert Mod 8TB
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

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

Similar topics

1
by: JMCN | last post by:
I have an ftp program that i inherited and i tried to modify it to ftp over my file however, i receive an error message : run-time error '3075 syntax error (missing operator) in query expression...
3
by: william | last post by:
Hello Everyone, I'm using Access 2000. I entered the following code to do some data validation, however it is not working. I'm trying to ensure that the user cannot enter a duplicate inspection...
0
by: j.rogel | last post by:
Hello everyone! I am new to this sort of postings so I'm not even sure if this is the correct place to start. Anyway, I would realy appreciate any help. I have a some VBA code that works quite...
5
by: MARTINQC | last post by:
"SELECT ., .Category INTO tblSiteGroupActiveTicketRawData FROM .Base = 'AAAA') OR (.Base = 'BBBB')) AND (.Status != 'Closed');" Above SQL string fails with a runtime error 3075 syntax error...
1
by: BinduKatoch | last post by:
One of the entries in my database has "apostrophe" I have a form in access... When i try to select that entry from the table it gives me error "syntax error(missing expression) in query...
1
by: kickergirl | last post by:
I recently created a database in Access 2000 that has been distributed to multiple people using various versions of Access. Each person is using it as a standalone database. The database has...
3
by: adigga1 | last post by:
Hello Experts, I'm about to go grey with this dlookup statement: I'm trying to run a dlookup statement, I have the correct expression string, etc. but when I run it under the Immediate window...
3
by: timber910 | last post by:
Hello All, I'm in need of help here. I have build my query in a query builder in access as a select query. Query runs fine. Changed it to a make table query. Query makes table ok. Copy and pasted...
3
by: Sophiecarr | last post by:
Hi, I am trying to use DLookup in relation to input from an option group. The option group has 3 options (Course Title), in a 'Core Modules' table, I have set the primary field to be the 'Course...
7
by: Vasago | last post by:
Trying to look up a value based on 2 criteria. Can't seem to debug the error thanks for your help! = Nz(DLookup("", "", "Employee='" & Forms!! & "And ='" & Date & "'"), 0)
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.