Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum in query on the fly

Status
Not open for further replies.

Xenocide

Programmer
Jan 20, 2005
76
CA
Hi I'm doing a query on the fly

lst3.RowSource = "Select Sum(Table850.Depense) " & _
"FROM Table850 " & _
"WHERE Table850.Maitre = '" & lst1.Value & "' " & _
"AND Table850.IdEngagementA <> '" & lst1.Value & "' ;"

I assumed that since for Format you put () Sum would be the same but seem like no.. does someone know how to make my query work with sum in it?
 
What is the problem ? Error message ? Unexpected behaviour ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Looks like there's nothing wrong with your query structure. ARe you getting an error? THe wrong information? No information?



Leslie
 
actually no error.. but it doesn't return any data either.
 
It's ok I corrected the problem by doing
Sum(table850.Depense) as Total

seem like assigning the data to a variable was what was missing

Thanks to both of you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top