473,654 Members | 3,098 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

need replacement for DLookup in UPDATE query

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 underlying subquery to this Update query involves a MAX function on
a date field, which is then used in the DLookup statement.

Any help appreciated. Thanks
Richard

Mar 31 '06 #1
2 5062
DFS
bo*********@yah oo.ca wrote:
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 underlying subquery to this Update query involves a MAX function on
a date field, which is then used in the DLookup statement.

Any help appreciated. Thanks
Richard


Can you post your update query?

Mar 31 '06 #2

DFS wrote:
bo*********@yah oo.ca wrote:
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 underlying subquery to this Update query involves a MAX function on
a date field, which is then used in the DLookup statement.

Any help appreciated. Thanks
Richard


Can you post your update query?


UPDATE [Client ACE Query] SET [Client ACE Query].[Archive Box Number] =
DLookUp("[Archive Box Number]","[Max ACE Box Number Query]","[Client
Number] ='" & [Client ACE Query]![Client Number] & "'")
WHERE ((([Client ACE Query].[Archive Box Number]) Is Null) AND
(([Client ACE Query].[Archived Status])=No));

Max ACE Box Number Query gets the highest Archive Box Number value for
each client, so that the Update query can place this value in all of
the client's records in the Client ACE Query.

Thanks
Richard

Apr 4 '06 #3

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

Similar topics

7
2253
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 expression I don't get any result. I want to use the Sum of the result in a query on which I will base a report. TIA Tony
11
2794
by: my-wings | last post by:
I think I've painted myself into a corner, and I'm hoping someone can help me out. I have a table of books (tblBooks), which includes a field (strPubName) for Publisher Name and another field (strPubCity) for Publisher City. These two fields have a many-to-one relationship with tables, (tlkpPubName and tlkpPubCity) respectively. The lookup tables only have one field (strPubName and strPubCity), which is their primary key. I also have...
3
6595
by: BillCo | last post by:
I'm usually strongly opposed to using dlookup in queries, but I need this query to be updatable, so adding a subquery isnt an option. The dlookup works fine except, I need to sort the results based on the returned values. This doesnt work. Here's what I have (names changed to protect the innocent!): SELECT tblx.x, tblx.y, tblx.z,
21
3345
by: Thelma Lubkin | last post by:
I would like my DLookup criteria to say this: Trim(fieldX) = strVar: myVar = _ DLookup("someField", "someTable", "Trim(fieldX) = '" & strVar & '") I don't believe that this will work, and I won't be at a machine with access to Access for a while, so can someone please tell me how to write this? thanks, --thelma
1
1952
by: Eric | last post by:
This is the query which i run when the form load. In tbl_EquipmentChronology there are three variables Equipment1, Equipment2, Equipment3. If Equipment1 and 2 are not empty then the query copy equipment2 value in txt of table tbl_Event. Is it possible i do the same IIF or any other way i check into DLookup. I mean same if in tbl_EquipmentChronology Equipment1, 2 and 3 are not empty it shows the value from Equipment3 in List17. Thanks
1
2301
by: BobbyDazzler | last post by:
tblproduct (simplified) productid(pk) productcode productcost productprice warrantycode any warranty claim is invoiced out as the original productcode but with a w in front e.g. original code 3005015TPR becomes W3005015TPR (both of which are in ) the warrantycode field is only
1
3639
by: Constantine AI | last post by:
Hi i am trying to get User input if data does not exist within a DLOOKUP table. I have gotten it to work for one record but not multiple, i have tried to incorporate my code into a loop procedure but i have failed. Could anyone give me any advice? Dim db As Database Dim rst As Recordset Dim rst2 As Recordset Dim strSQL As String Dim Widthval As Integer Dim Depthval As Integer Dim Heightval As Integer Dim...
3
9057
by: Kunal Desale | last post by:
Hello, I am migrating access queries to SQL Server 2005 Queries. My Access Query Is: SELECT qtrade.intordreftrim AS Expr1, qtrade.extordreftrim AS Expr2, qtrade.intinvreftrim AS Expr3, DLookUp("",""," = " & 4 & "and ='" & & "'") AS InvNoLookup, qtrade.invline AS Expr4, qtrade.accountid AS Expr5, qtrade.descriptn AS Expr6, DLookUp("",""," = " & 0 & "and ='" & & "'") AS , qtrade.qtyinv AS Expr7, qtrade.invdate AS Expr8, qtrade.amtuchg...
6
10204
by: deewe | last post by:
Hello, On an LostFocus event I'm trying to update another field that is tied to a DLookUp query. I'm able to update all the form fields but I don't find a way to update only one field. The below tests update all the fields - Me.Recalc - Me.Controls("Txtbox_RatioDev2").Recalc
0
8290
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,...
0
8707
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 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...
1
8482
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,...
0
7306
agi2029
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...
1
6161
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1593
bsmnconsultancy
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...

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.