0

I am trying to add from two separate text boxes from different datasets I had to create a code to summarize (codes below) giving a total. What I am trying to do is get GapTotal + GapTotal2 together into a separate dataset. Unfortunately I get a blank. Can anyone help? Thank you in advance

Public GapTotal AS Integer = 0
Public Function Sum(ByVal Value As Integer) As Integer
GapTotal = GapTotal + Value
Return Value
End Function


Public GapTotal2 AS Integer = 0
Public Function SumIt(ByVal Value As Integer) As Integer
GapTotal2 = GapTotal2 + Value
Return Value

End Function
SouravA
  • 5,147
  • 2
  • 24
  • 49

1 Answers1

0

There are two possible approaches l can think of here.

First reference the values in each dataset and add the values see this posting - Stack Overflow posting

Second place the values from each data into a control eg a text box, then add the values in each text box see - SQL Server Central posting

Community
  • 1
  • 1
SQLBobScot
  • 694
  • 5
  • 20