Solved

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

Posted on 2016-10-16
4
79 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
  • 2
  • 2
4 Comments
 
LVL 51

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 51

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

837 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