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

DAO seems to be updating more than current record???

MLH
I have a query that I open the following way...
Dim MyDB As Database, MyRst As Recordset
Set MyDB = CurrentDb
Set MyRst = MyDB.OpenRecordset("qryUnpaidInvoices", dbOpenDynaset)
MyRst.MoveFirst
Need2Send = False
InvoiceDate = MyRst!InvoiceTDstamp
LastSendDate = MyRst!LastReminderDate
If DateDiff("d", LastSendDate, Now) >= 3 Then
MyRst.Edit
MyRst!LastReminderDate = Now
MyRst.Update
Need2Send = True
End If
The query rreturns 2 records. When the recordset Update executes,
it seems that both of thsoe records are being updated instead of just
the current record in DAO. I only want the first of the 2 records to
receive the new setting of Now(). Am I missing something here, or is
this strange behavior?

Here's the query...
SELECT tblVehicleJobs.InvoiceNumber, tblVehicleJobs.ProcFee,
tblinvoiceNums.InvoiceTDstamp, tblClusters.ClusterName, [VColor] & " "
& [VehicleYear] & " " & [VehicleMake] & " VIN: " & [SerialNum] & " at
" & [TowCompany] & " " & [TowCoAddr] & " " & [TowCoCity] & " VID: "
& CStr([VehicleJobID]) & " Sale Date Scheduled: " & [SaleDate] AS
Vehicle, tblinvoiceNums.LastReminderDate, tblClusters.ClusterID,
tblVehicleJobs.VehicleJobID, tblClusters.PCeMail, tblClusters.BCeMail,
SaleDate4Avehicle([VehicleJobID]) AS SaleDate
FROM tblClusters INNER JOIN (tblAdmin INNER JOIN (tblinvoiceNums INNER
JOIN tblVehicleJobs ON tblinvoiceNums.InvoiceNumber =
tblVehicleJobs.InvoiceNumber) ON tblAdmin.TowCoID =
tblVehicleJobs.TowCoID) ON tblClusters.ClusterID = tblAdmin.ClusterID
WHERE (((tblVehicleJobs.InvoiceNumber) Is Not Null) AND
((tblVehicleJobs.InvoicePaid)=False));
May 7 '07 #1
1 1182
MLH
Oops... my bad.

I see that updating the SINGLE record in tblinvoiceNums
reflects for both cars in tblVehicleJobs because those two
tables are related on the [InvoiceNumber] field. Of course,
any setting made in tblinvoiceNumswould apply to all cars
in tblVehicleJobs billed under the same invoice.
May 7 '07 #2

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

Similar topics

3
by: CSDunn | last post by:
Hello, I have an Access 2000 Project in which the data comes from a SQL Server 2000 database, and multiple users need to be able to see new records as each user adds records. The users also need...
1
by: Richard Coutts | last post by:
I have a Continuous Form where each record has a button that activates another form that simplifies entering values into the record. The activated form has the equivalent of a "Done" button. I'd...
5
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated...
2
by: barret bonden | last post by:
(closest newsgroup I could find) Error Type: ADODB.Recordset (0x800A0CB3) Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype....
1
by: rdemyan via AccessMonster.com | last post by:
My App has 10 or so tables that we provide that contains proprietary data. This data will need to be updated once or twice a year. I would like some comments, suggestions on my proposed strategy...
4
by: Cyberwolf | last post by:
I have a form that users enter information into. What I want to do is to update certain fields from another table once they have entered a number in a field. The form is already based on a query...
33
by: bill | last post by:
In an application I am writing the user can define a series of steps to be followed. I save them in a sql database using the field "order" (a smallint) as the primary key. (there are in the range...
9
by: hrreece | last post by:
I have an Access 2002 database that has a form that can be used to review individual records. At the bottom of the form are buttons that are linked to functions that allow the user to "Find a record...
4
by: aaronyoung | last post by:
I have created custom navigation buttons and Record Number indicators on several forms that are used to review and update records based on a query. My On Current event to update the "Record X of...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.