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

Calculating Sum in grid

Ali Rizwan
925 512MB
Hi

i m using this code for claculating total expenses of month, in timer.


Text3.Text = Val(Text3.Text) + Val(Text2.Text)

If ADATA.Recordset.EOF Then

lblTotal.Caption = Text3.Text
timCalc.Enabled = False

ADATA1.Refresh
Text3.Text = 0
timcalc1.Enabled = True

Else

ADATA.Recordset.MoveNext

End If

if there is any convenient and quick way to find sum of all expense then plz tell me.
Sep 5 '07 #1
1 1308
Hi

i m using this code for claculating total expenses of month, in timer.


Text3.Text = Val(Text3.Text) + Val(Text2.Text)

If ADATA.Recordset.EOF Then

lblTotal.Caption = Text3.Text
timCalc.Enabled = False

ADATA1.Refresh
Text3.Text = 0
timcalc1.Enabled = True

Else

ADATA.Recordset.MoveNext

End If

if there is any convenient and quick way to find sum of all expense then plz tell me.
Youve got a recordset, presumably through an data control.

I also suspect youve got textboxes binded to the data control.

Your doing calculation at the client. This might be good.

However, you may want to get calculations from your database. But, since you do not show how the datasource is implemented, it is difficult to provide the best answer.

Assuming values are saved dynamically (through the data control), run a query to get results. You can tie this in with a new data control and use binding to show results.
Sep 5 '07 #2

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

Similar topics

5
by: Ron Adam | last post by:
Hi, I'm having fun learning Python and want to say thanks to everyone here for a great programming language. Below is my first Python program (not my first program) and I'd apreciate any...
0
by: Kasp | last post by:
Hi there, I am trying to make an OLAP cube on a table having two columns (datetime, Number_of_times_an_event_occured). My dimension is time and I want to measure the Min and Max times an event...
1
by: Joe Bongiardina | last post by:
What does the message "calculating...." mean in the lower left status area of a form? I have a form with no calculated, concatenated or lookup fields, yet it displays this msg. The form takes...
1
by: jlm | last post by:
I have a form which feeds table (TblEmpLeave) of Employee Leave Time (time taken off for Administrative, Annual, Sick, Compensation leave). I have EmpID, LeaveDate, LeaveType, LeaveHours fields on...
4
by: luscus | last post by:
I am trying to device a formula so that when i check of a yes/no box (done) it will automatically add the time in a field called "End Time" and at the same time stamp the amount of minutes...
3
by: luscus | last post by:
Thanks for all the responses on my first question. Unfortunately the answers I was given were too complicated for my small brain , and neophite condition to understand. So if you could talk down to...
0
by: robin9876 | last post by:
In an Access 2000 database on some forms 'Calculating...' is continuously displayed in the status bar window and the text of the control is automatically selected. The only workaround is switching...
0
by: hlam | last post by:
Help - Calculating the total of a column in a data grid -- when data grid is part of Master-Detail set-up I have setup a Master-Detail form using Visual Studio.Net. A ListBox is the (Master)...
2
by: Don | last post by:
How would I get a query to calculate hours? if "Starttime" = 10:00AM and "Quittime" = 04:00PM Thanks, Don.............
6
by: Romulo NF | last post by:
Greetings again to everyone, Im back to show this grid componenet i´ve developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data,...
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: 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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.