Mposwal
New Member
- Joined
- Jul 22, 2022
- Messages
- 33
- Office Version
- 365
- 2021
- Platform
- Windows
- Mobile
- Web
Hi All,
I am facing some strange type of error on performing a simple task,
What i am trying to set a column value (Vol3) by subtracting Vol2 column from Vol1 column of same table by using the following query (using ADO Connection and recordset):
rs2.Open "Update " & SchemeName & " Set Vol1=Volume ;", conn2
rs2.Open "Update " & SchemeName & " Set Vol2=Volume Where trim(REBGRP)='" & Prod1 & "';", conn2
rs2.Open "Update " & SchemeName & " Set Vol3=(vol1-vol2);", conn2
the problem is that my first two update queries are working perfectly and setting vol1 and vol2 values, but third query returning blank (0 for some cases where vol1=vol2).
I have spend almost many hours for trouble shoot the same but all in vain.
Any help will be appreciated.
I am facing some strange type of error on performing a simple task,
What i am trying to set a column value (Vol3) by subtracting Vol2 column from Vol1 column of same table by using the following query (using ADO Connection and recordset):
rs2.Open "Update " & SchemeName & " Set Vol1=Volume ;", conn2
rs2.Open "Update " & SchemeName & " Set Vol2=Volume Where trim(REBGRP)='" & Prod1 & "';", conn2
rs2.Open "Update " & SchemeName & " Set Vol3=(vol1-vol2);", conn2
the problem is that my first two update queries are working perfectly and setting vol1 and vol2 values, but third query returning blank (0 for some cases where vol1=vol2).
I have spend almost many hours for trouble shoot the same but all in vain.
Any help will be appreciated.