Solved

syntax error in query expression in MS/ACCESS 2016 (DLOOKUP)

Posted on 2016-10-16
4
97 Views
Last Modified: 2016-10-19
I am consistently getting this error and I can't find any reason. can anyone help?

Screen-Shot-2016-10-16-at-09.52.40.png
0
Comment
Question by:jirdeaid
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 52

Accepted Solution

by:
Ryan Chong earned 500 total points
ID: 41845441
try:

t = Dlookup('tempoCriticidade", "Q06_zCT_criticidadeTempo", "criticidadeTicket = '" & Me.fld_criticidadeTicket & "' " )

or

t = Dlookup('tempoCriticidade", "Q06_zCT_criticidadeTempo", "criticidadeTicket = '" & replace(Me.fld_criticidadeTicket,"'","''") & "' " )
0
 

Author Comment

by:jirdeaid
ID: 41845448
the first one worked OK! Thanks!
0
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 41845535
cool, glad that it helps cheers
0
 

Author Closing Comment

by:jirdeaid
ID: 41850685
thought it was closed....
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question