I have a query that I'm trying to update with a dlookup with multiple criteria
This is the string: - EVNT_DT: DLookUp("[Date]","[LU - Quarter Dates]","( [PRC_15011 - Find_Vendor_Mgmt_Fees].EVNT_QTR=[LU - Quarter Dates].[Quarter]) & ([PRC_15011 - Find_Vendor_Mgmt_Fees].[EVNT_YEAR]=[LU - Quarter Dates].[YEAR])")
When i run it it says it can't find the name PRC_15011 - Find_Vendor_Mgm t_Fees.EVNT_QTR .
But I know the names are right, I've checked them three times.
Does anyone have an idea what's wrong? Is it the wrong syntax or something?
4 3333
does anyone have any ideas? I have tried it about three different ways, and I cna't get it correct?
ADezii 8,834
Recognized Expert Expert
I have a query that I'm trying to update with a dlookup with multiple criteria
This is the string: - EVNT_DT: DLookUp("[Date]","[LU - Quarter Dates]","( [PRC_15011 - Find_Vendor_Mgmt_Fees].EVNT_QTR=[LU - Quarter Dates].[Quarter]) & ([PRC_15011 - Find_Vendor_Mgmt_Fees].[EVNT_YEAR]=[LU - Quarter Dates].[YEAR])")
When i run it it says it can't find the name PRC_15011 - Find_Vendor_Mgm t_Fees.EVNT_QTR .
But I know the names are right, I've checked them three times.
Does anyone have an idea what's wrong? Is it the wrong syntax or something?
Are the Tables [LU - Quarter Dates] And [PRC_15011 - Find_Vendor_Mgm t_Fees] related? If so, create a Query using both Tables and including any relevant Fields. Specify this Query as your Domain instead of [LU - Quarter Dates]. If they are not, I'm not sure that you can what you are requesting.
NeoPa 32,569
Recognized Expert Moderator MVP
I have a query that I'm trying to update with a dlookup with multiple criteria
This is the string: - EVNT_DT: DLookUp("[Date]","[LU - Quarter Dates]","( [PRC_15011 - Find_Vendor_Mgmt_Fees].EVNT_QTR=[LU - Quarter Dates].[Quarter]) & ([PRC_15011 - Find_Vendor_Mgmt_Fees].[EVNT_YEAR]=[LU - Quarter Dates].[YEAR])")
When i run it it says it can't find the name PRC_15011 - Find_Vendor_Mgm t_Fees.EVNT_QTR .
But I know the names are right, I've checked them three times.
Does anyone have an idea what's wrong? Is it the wrong syntax or something?
You're using the ampersand character (&) instead of the SQL AND operator. This will have the effect of concatenating the two criteria as strings instead of performing a logical AND on the results. -
EVNT_DT: DLookUp("[Date]", _
-
"[LU - Quarter Dates]", _
-
"([PRC_15011 - Find_Vendor_Mgmt_Fees].EVNT_QTR=[LU - Quarter Dates].[Quarter]) " & _
-
"AND " & _
-
"([PRC_15011 - Find_Vendor_Mgmt_Fees].[EVNT_YEAR]=[LU - Quarter Dates].[YEAR])")
NeoPa 32,569
Recognized Expert Moderator MVP
Of course, as you're trying to access fields from a table that isn't referenced in the DLookup function anyway ([PRC_15011 - Find_Vendor_Mgm t_Fees]), it won't work as I expect you intend. It looks as if you are after something a little more complicated than you've assumed.
You will need to build some sort of query that connects the two tables before trying this.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: KLAU |
last post by:
I have a field that retrieves information from an expression in a
query. I have used a DLookup function to get the calculated field
from the query. However, the relationship is 1-to-many so one site
could have many units. How do I have the DLookUp field value change
to a newly calcuated field when I navigate through the units? please
see example below:
On the Form:
A site can have many units.
|
by: ShyGuy |
last post by:
I have a table with 4 fields. Three are used for criteria.
I can get the DLookup to work with 1 criteria with the following but
can't get it to work with 2 or three.
NumofAppts = DLookup("", "LookUpAppts", "
= " & Forms!!NumofPeople)
Can someone tell me how to add multiple criteria? I tried "And" but
it doesn't seem to work.
|
by: Nick J |
last post by:
Hi,
I want t display several fields in one label box using the DLookUp function.
I have tried using below but all I get is '-1' when I preview the report.
Any idea's?
=DLookUp("" And "","tblCompanyDetails")
--
|
by: chris.thompson13 |
last post by:
I am having a problem setting the criteria part of the DLookup method
correctly and am consequently getting an error message.
I have a database of staff duties, part of which is a query (qryDaily)
that returns all staffs duties for a selected day.e.g.
Fullname Duty
Name1 E1
Name2 Sick
Name3 Pwk N2
|
by: bjaj |
last post by:
Hi
How do I use a boolean criterian with the funktion DLookup ?
I know the syntax for strings, numeric and date as follows
For numerical values:
DLookup("FieldName" , "TableName" , "Criteria = n")
For strings: (note the apostrophe before and after the value)
| |
by: MSeda |
last post by:
I have a loop that is controlled by a Dlookup statement with two criteria. Both criteria fields are checkboxes. I have tried an assortment of quotation marks in the criteria section and cannot get the Dlookup to run. My statement looks like this (I have removed the extraneous quotes since they are not working anyway):
Do Until IsNull(DLookup("", "Quoted Parts Table", " = Yes And = Yes"))
I've never quite understood the logic of the...
|
by: vkong85 |
last post by:
I'm creating a database for work and i've run into a snag. Currently i'm using to nested dlookup statements and they are searching for certain criteria in order to find the correct value the statement reads:
= DLookup ( "!" ," tbl Cost Center", "!= DLookUp("!","tbl people","!= Forms!!")")
i've swapped the quotations marks and have tried god knows how many syntaxs for numeric and text. The first dlookup criteria is text. the second dlookup...
|
by: BradHodge |
last post by:
Wouldn't ya know it. Posting a question on my first day of "ExpertDum" :)
How do you use DLookup with multiple criteria from the same table?
I have a report and I want a text box to display the weekly totals for a given employee. Here is what I have so far in the Control Source...
=DLookUp("","qryMembersTotals","=Report!")
And I want to add this... =Report!
Thanks,
(Soon to be UnExperted) Brad.
|
by: Denise |
last post by:
Front end is Access 2002, back end is linked Oracle tables.
My users need to describe things in feet and inches and want to use
the standard ' and " abbrevations.
On a testing form I go to a record with double or single quotes in the
location description and click a button to see if Access can tell me
the ID number and find its way back to the original record.
When the text contains double quotes the FindFirst works but the
Dloookup...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |