Solved

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

Posted on 2016-10-16
4
85 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

680 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