You can add them directly from your recordset like this:
Dim dblNewAmount
dblNewAmount = rs.Fields("Field1") + rs.Fields("Field2")
Make sure that both values are numeric first, otherwise it may produce an error.
Or you can change your sql statement to return both fields added:
select Field1 + Field2 as NewAmount
from table
Now you can grab it from a recordset like this:
Dim dblNewAmount
dblNewAmount = rsFields("NewAmount")
Mark
jacknvrr <[EMAIL PROTECTED]> wrote:
hi i need help with calculation. can anyone please tell or teach me
how to add two fields from the database.i really need to find out.its
really important.thanks
Yahoo! Groups SponsorADVERTISEMENT
---------------------------------
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/