Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 5th, 2009, 04:18 AM
Authorized User
 
Join Date: Nov 2005
Posts: 19
Thanks: 1
Thanked 0 Times in 0 Posts
Default SUMM recorset fileds and recopy in listview1

Note: i use the tipical ADO conn.
In the excel file are a table structure and a listview1 structure.
Now i want to select dinstinct based CAMPO1 and recopy in listview1 but with total summ of CAMPO6...
Result is in listview1 in excel file attached.


TABLE CAMPO1CAMPO2CAMPO3CAMPO4CAMPO5CAMPO6AAAATEST1TEST2TEST3TEST4100,00AAAATEST1TEST2TEST3TEST414.587,00BBBBTEST1TEST2TEST3TEST41.478,00CCCCTEST1TEST2TEST3TEST42.589,00BBBBTEST1TEST2TEST3TEST424.589,00AAAATEST1TEST2TEST3TEST4147,00


RESULT IN LISTVIEW1CAMPO1CAMPO2CAMPO3CAMPO4CAMPO5CAMPO6AAAATEST1TEST2TEST3TEST414.834,00BBBBTEST1TEST2TEST3TEST426.067,00CCCCTEST1TEST2TEST3TEST42.589,00
 
Old February 5th, 2009, 08:10 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hi there.. can you please try to reformat your post, so we can see what are you actually trying to do?

Thanks.

(I think and I can assume that you want something like "SELECT SUM(campo6) FROM table GROUP BY campo1")
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
The Following User Says Thank You to gbianchi For This Useful Post:
sal21 (February 8th, 2009)
 
Old February 8th, 2009, 04:53 PM
Authorized User
 
Join Date: Nov 2005
Posts: 19
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by gbianchi View Post
Hi there.. can you please try to reformat your post, so we can see what are you actually trying to do?

Thanks.

(I think and I can assume that you want something like "SELECT SUM(campo6) FROM table GROUP BY campo1")
Hi gbianchi (i dont know your really name)...
Is exactly wath i want.
Tks!
 
Old February 8th, 2009, 06:18 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Gonzalo is my name. and no prob.
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
ado.recorset.filter "like" trouble hamid1345 VB Databases Basics 2 April 14th, 2017 03:21 PM
static fileds angelboy C# 2005 3 August 5th, 2007 06:31 AM
Generate summ rpt,auto send fr various excel files miracles Excel VBA 2 March 29th, 2007 03:45 AM
Generate summ rpt,auto send fr various excel files miracles Excel VBA 0 March 28th, 2007 02:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.