473,394 Members | 1,694 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,394 software developers and data experts.

Is it possible to substitute an expression for the middle parm in a DLookUp function statement?

MLH
Instead of DLookUp(Field, Tbl/Qry, Where clause), I was hoping
to be able to substitute an expression for the tbl/qry parm

?DLookUp("[ClusterID]","tblAdmin INNER JOIN tblVehicleJobs ON
tblAdmin.TowCoID =
tblVehicleJobs.TowCoID","tblVehicleJobs.VehicleJob ID=GetCurrentVehicleJobID()")

Or, broken up into its 3 parts for legibility...

DLookUp
("[ClusterID]",
"tblAdmin INNER JOIN tblVehicleJobs ON tblAdmin.TowCoID =
tblVehicleJobs.TowCoID",
"tblVehicleJobs.VehicleJobID=GetCurrentVehicleJobI D()")

I'm not having any luck. Wondering if it can even be done?
Jun 17 '06 #1
3 1352
You can create a query with the join you mention then use the query for the
parameter.

--
Wayne Morgan
MS Access MVP
"MLH" <CR**@NorthState.net> wrote in message
news:rt********************************@4ax.com...
Instead of DLookUp(Field, Tbl/Qry, Where clause), I was hoping
to be able to substitute an expression for the tbl/qry parm

?DLookUp("[ClusterID]","tblAdmin INNER JOIN tblVehicleJobs ON
tblAdmin.TowCoID =
tblVehicleJobs.TowCoID","tblVehicleJobs.VehicleJob ID=GetCurrentVehicleJobID()")

Or, broken up into its 3 parts for legibility...

DLookUp
("[ClusterID]",
"tblAdmin INNER JOIN tblVehicleJobs ON tblAdmin.TowCoID =
tblVehicleJobs.TowCoID",
"tblVehicleJobs.VehicleJobID=GetCurrentVehicleJobI D()")

I'm not having any luck. Wondering if it can even be done?

Jun 17 '06 #2
MLH
Yeah, I understand that part. Was hoping to avoid having a saved
query. I guess that's not possible.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x
On Sat, 17 Jun 2006 15:35:22 GMT, "Wayne Morgan"
<co***************************@hotmail.com> wrote:
You can create a query with the join you mention then use the query for the
parameter.


Jun 21 '06 #3
To avoid the stored query you could try

DLookUp
("[ClusterID]",
"tblAdmin",
"TowCoID = (SELECT TowCoID FROM tblVehicleJobs WHERE
tblVehicleJobs.VehicleJobID=GetCurrentVehicleJobID ())")
Jun 28 '06 #4

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

Similar topics

1
by: Andre | last post by:
I am needing to Parse some text fields, where a 3rd party application i use stores data from a user created expression. the user creates and expression such as this: ActualSizeYN =Y?...
1
by: Thelma Lubkin | last post by:
I am still struggling with trying to match a user supplied string with strings in a field of a table, where spaces are to be ignored. Arno suggested that I use the Dlookup function, but I...
15
by: Nerox | last post by:
Hi, If i write: #include <stdio.h> int foo(int); int main(void){ int a = 3; foo(a); }
6
by: Angel | last post by:
I'm exporting (with DllImport) a C-style function with this syntax: int z9indqry (4_PARM *parm); 4_PARM is a structure declared in a proprietary header file that cannot be included in my...
2
by: dhannotte | last post by:
I like to code parameters to my Javascript functions within strings that look like UNIX command parameters. For instance I might say myfunc("-center -w:100% -nocache"); I've written a function...
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: jonvan20 | last post by:
I have been having trouble with a simple Dlookup command that was Reccommended to me by a nice fellow named Vic, On the other hand I have statements like this that wont run they give me a run time...
18
by: njgreen2001 | last post by:
I thought the length of this might give me problems. Any suggestions on how to shorten it? Expression: =IIf(="A Pos" And ="A Pos",(DLookUp("","")), IIf(="A Pos" And ="A...
15
by: Dan Henry | last post by:
I have run across functions in the Linux kernel's MTD driver that have me scratching my head a bit. The functions have the general form: extern int bar(size_t len, size_t *retlen, unsigned char...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
Oralloy
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,...
0
jinu1996
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...

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.