ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA Help in EXCEL (https://www.excelbanter.com/excel-programming/276801-re-vba-help-excel.html)

Bob Kilmer

VBA Help in EXCEL
 
Does it give you the wrong answer or an error? Always zero? What if you run
"Select AmtRX from ClaimInfoFacets" or "Select sum(AmtRX) from
ClaimInfoFacets" ?

I often try simpler versions of a troublesome query in an interactive query
tool or at a command line, check results and build it up until I understand
the problem

--
Bob Kilmer


"Heather" wrote in message
...
Does anyone know what is wrong with this? I can't get it
to calculate the AmtRx correctly???


'ClaimInfo data for the GroupID
If ClassVar1 = "" And ClassVar2 = "" And ClassVar3 = "" _
And PlanVar1 = "" And PlanVar2 = "" And PlanVar3 = "" _
And BusVar1 = "" And BusVar2 = "" And BusVar3 = "" _
Then
strSQL = "Select PaidDtYM, sum(AmtMed), sum(AmtVis), sum
(AmtRX), sum(AmtOth)" & _
" From ClaimInfoFacets " & _
" Where GroupID IN ('" & GroupVar1 & "','" &
GroupVar2 & "', '" & GroupVar3 & "') " & _
" And PaidDtYM Between " & BCD & " AND " &
ECD & _
" Group By PaidDtYM"





All times are GMT +1. The time now is 05:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com