By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,996 Members | 896 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,996 IT Pros & Developers. It's quick & easy.

i want to sum one column in the database using Visual Basic 6

P: 2
hi....
plz help me
i have table in database using access 2003 ,wanna make summation 2 column in it
so 1-which type of data choose (microsoft data grid...or etc)
2- the code entering in sub command to do the summation


so plzzz helpp mee .....
Feb 5 '08 #1
Share this Question
Share on Google+
3 Replies


jamesd0142
100+
P: 469
hi....
plz help me
i have table in database using access 2003 ,wanna make summation 2 column in it
so 1-which type of data choose (microsoft data grid...or etc)
2- the code entering in sub command to do the summation


so plzzz helpp mee .....
First you will need to make a database connection and simply pass the sql statement:

select sum(<columnname>) from <tablename>
Feb 5 '08 #2

P: 2
First you will need to make a database connection and simply pass the sql statement:

select sum(<columnname>) from <tablename>
thank u James ...
but i wanna more details in code as total ....
my program is that r 2 text box
text1 and text 2 and one sub command
wanna make code
as entering the value in text 1 recorded in database
and viewing the summation in the column in the database
+ i tried this code after connectiing the database
it gaves me "error " so help me
and thanks
Feb 6 '08 #3

jamesd0142
100+
P: 469
thank u James ...
but i wanna more details in code as total ....
my program is that r 2 text box
text1 and text 2 and one sub command
wanna make code
as entering the value in text 1 recorded in database
and viewing the summation in the column in the database
+ i tried this code after connectiing the database
it gaves me "error " so help me
and thanks

what was the error you recieved?
Your datatype must be 'integer' or 'number'...etc to get the sum.
Feb 8 '08 #4

Post your reply

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