Question
March 30, 2008 at 11:45 AM
moose4098

VB6 and sql server 2005 express, sum field to text box on form

by moose4098 . Updated 18 years, 4 months ago

I was wondering if anyone had a solution for this im sure its something simple, but im having trouble with it.
first off i have a mod that does a sql connecting and it works fine, my problem is that i can’t seem to get a sum amount between dates to send to a text box on a form. EG:
Call SQLOpen(1, “”, “”, “”, “Provider=SQLOLEDB.1;Password=testing;Persist Security Info=True;User ID=sa;Initial Catalog=ftstjohn;Data Source=SQLSERVER\SQLEXPRESS”)
sqlQuery = “SELECT sum(fldCash) as fldtCash From tblCash WHERE fldDate BETWEEN ’01/01/2008′ AND ’01/31/2008′”
frmTumblerTotals.txtFields.item(1).Text = sqld.Fields.item.Value(fldtCash)
Call sqlCallQuery(1, sqlQuery, sqld)
if anyone could help it would be appreciated

Thanks in advance

This discussion is locked

All Comments