473,386 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Performing DLookUp in a query field?

MLH
I have a query that looks up records in tblReturnReceipts
and other related tables. One of the other tables is
tblCorrespondence. The resulting dynaset consists of five
records. Each has a unique [RtnRcptID] field value and
each has a unique [CorrespID] field value.

I would like to add an additional field to the query that
performs a DLookup for some other stuff - using the query's
[CorrespID] value in the DLookup's criteria section. Of course,
I'm having difficulty because I'm unable to reference the query's
[CorrespID] field value inside the DLookup's criteria section.

Anybody have a useful strategy for such a need?
May 18 '06 #1
1 2382
MLH <CR**@NorthState.net> wrote in
news:40********************************@4ax.com:
I have a query that looks up records in tblReturnReceipts
and other related tables. One of the other tables is
tblCorrespondence. The resulting dynaset consists of five
records. Each has a unique [RtnRcptID] field value and
each has a unique [CorrespID] field value.

I would like to add an additional field to the query that
performs a DLookup for some other stuff - using the query's
[CorrespID] value in the DLookup's criteria section. Of course, I'm having difficulty because I'm unable to reference the query's [CorrespID] field value inside the DLookup's criteria section.

Anybody have a useful strategy for such a need?

'correspID is a number
expr1: Dlookup("fieldname","Lookuptable","correspID = "
& [tblCorrespondence].[correspID & ")"

'correspID is a string
expr1: Dlookup("fieldname","Lookuptable","correspID = """
& [tblCorrespondence].[correspID & """)" 'correspID is a string

Pick the one for your situation
--
Bob Quintal

PA is y I've altered my email address.
May 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
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...
6
by: JLM | last post by:
What am I missing here? I have a form where I enter a "Class Code". This value corresponds to what sits in table "class code descriptions" along with the "title" of each "class code." Key...
7
by: Tony Williams | last post by:
Does DLookup work in an expression in a query? I have this expression -(DLookUp("","tblmaintabs","= ")) Which works fine as a calculated control on a form but when I try to use it in a query as an...
0
by: Tony Williams | last post by:
I have posted a number of posts in the Access newsgroups concerning my problem with DLookup. I have had a number of the experts with helpful suggestions but I still can't get it to work! This is...
8
by: Christine Henderson | last post by:
I have a problem using the above function in the following simplified circumstance: In the lookup table called "Klms Travelled" I have 3 fields, eg: Receiver Name Receiver Suburb ...
2
by: bobabooey2k | last post by:
I have an update query with one field having in its "Update to" cell a DLookup statement. This query takes 2-3 minutes on 3000 records. Can I avoid dlookup here using multiple queries? An...
2
by: sfrvn | last post by:
I am embarrassed to say I cannot make this work. Recently upgraded to Access 2003, but do not know if that part of problem (AKA 'syntax change'). Would someone be kind enough to lead me by the...
3
by: hrreece | last post by:
I am trying to use the Dlookup expression in a macro to pull the value from the "Price" field in the following query. The query works fine and the Dlookup function did as well until I added a new...
3
by: Demosthenis | last post by:
Hello, I am trying to seto up a Dlookup in a query. My Dlookup field will retrieve data from a second query. The match criteria is the W field. This dlookup up process has to retrieve 24...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.