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

How can I add up a value to the current recordset value when editing a table?

here is my code I can edit the current rs value, but this code is replacing the existing one. Instead I need the code to add a new value to the existing one

Expand|Select|Wrap|Line Numbers
  1. If rs31![POID] = rs32![POID] And rs31![MRP Date] < rs32![Pstg Date] Then
  2. rs31.Edit
  3. rs31![QTY ACC] = rs32![QTY ACC]
  4. rs31.Update
In other words I need rs31 to be equal rs32 + current value in rs31.

Any help on that pls?
May 9 '11 #1
1 1416
gnawoncents
214 100+
If I understand you correctly, if rs31![QTY ACC] is 5 and rs32![QTY ACC] is 6, then you want rs31![QTY ACC] to be 11, right? If so, try:

Expand|Select|Wrap|Line Numbers
  1. If rs31![POID] = rs32![POID] And rs31![MRP Date] < rs32![Pstg Date] Then
  2. rs31.Edit
  3. rs31![QTY ACC] = rs31![QTY ACC] + rs32![QTY ACC]
  4. rs31.Update
May 10 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: lgo | last post by:
I have read several variations of this topic posted on this news group. However I was not able to find the answer for my problem. I am trying to build code (see below) to update a large single...
1
by: Blake Versiga | last post by:
When editing a datagrid (C#) I need to know if the user changed the value of cell AND what the previous value was. Is this possible? If so how do I get the previous value or at least if the...
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....
5
by: Hexman | last post by:
I've come up with an error which the solution eludes me. I get the error: >An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in HRTest.exe > >Additional...
9
by: Johnfli | last post by:
ADODB.Recordset error '800a0cb3' Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype. I am moving my webserver from NT4 using SQL...
2
by: news.microsoft.com | last post by:
Hi guys, I have a problem with the DataGridView. I want to catch the value of a cell when the user is editing it. Actually, I can't figure if there is an event or a property to get this value. ...
12
by: Snoopy33 | last post by:
I have a FE / BE setup on my database. One of the main reasons that I did this was so that I could edit the front end and upload it without causing problems with day to day activities. I have...
9
by: AAKK | last post by:
Hi Anyone help? Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype. /anata/Send_OrderList.asp, line 102 My Code as below <% ...
3
by: aleseus | last post by:
New to the forum, so thanks for having me. I'm submitting a form, and attempting to save it to a local copy of an ACCESS 2007 database. When I am submitting the form, I get the following error: ...
9
by: Will The Gray | last post by:
I am trying to load certain data from a table into a recordset and then working with it without affecting the data in the tables. The idea is to post all records in a table (given a certain...
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
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:
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...
0
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...

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.