Solved

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

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

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 49

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now