Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default 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"



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"