Mangler wrote:
Say I have to different recordsets that have the fields:
rsA.Fields.Item("A").Value ,rsB.Fields.Item("B").Value
How would I add those to fields? It may be my inexperience but when I
tried something like
rsA.Fields.Item("A").Value + rsB.Fields.Item("B").Value
didnt work because one of the fields was a empty value. I have about
6 fields i need to add together if a value exists in any of them.
1. Modify the sql statements that produce the recordset to ensure the
fields do not contain Nulls. The details depend on the database you are
using. For example, SQL Server has the COALESCE function that can be
used to return either the value, or 0 if the value is Null.
2. Assign the values to variables (GPB*), check to see if they have
values and, if not, set them to 0 (zero) before adding them
*Good Programming Practice
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.