473,397 Members | 2,116 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,397 software developers and data experts.

Run-time error '3075' with dlookup

46
I can't seem to get this dlookup to work correctly. I have double check all the spellings.

This is the error I'm Receiving.

Run-time error '3075':
Syntax error in query expression '[Trip Date] = #7/8/2014# and School = 'The A Group' and Amount =$409.78'.

Here is the code:
Expand|Select|Wrap|Line Numbers
  1. [Invoice #] = DLookup("[Invoice #]", "Invoices", "[Trip Date] = #" & Forms![charter order form]!Date & "# and School = '" & Forms![charter order form]!Client & "' and Amount =" & Forms![charter order form]!Quote)
Thanks for your help.
Jul 14 '14 #1

✓ answered by Rabbit

Remove the dollar sign.

2 1512
Rabbit
12,516 Expert Mod 8TB
Remove the dollar sign.
Jul 14 '14 #2
NeoPa
32,556 Expert Mod 16PB
The value in [Quote] is not numeric. It's a formatted string which contains a character ($) which precludes it from being recognised as a numeric value.

You can lose it in various ways, but a simple way would be to say :
Expand|Select|Wrap|Line Numbers
  1. [Invoice #] = DLookup("[Invoice #]", "Invoices", "[Trip Date] = #" & Forms![charter order form]!Date & "# and School = '" & Forms![charter order form]!Client & "' and Amount =" & Replace(Forms![charter order form]!Quote, "$", ""))
Jul 14 '14 #3

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...
5
by: Vasago | last post by:
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. tasksE = Nz(DCount("", "Tasks", "To='" & Forms!! & " and Complete=0"), 0)
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.