missprogrammer
Programmer
This query is running but it is not retuning a value.
Is there something wrong with my "having" clause
It returns a value when I just have the Round(intRound) alone, but when I include the Region(strRegion) it does not return any value. What am I doing wrong?
Dim intRound As Integer
Dim strRegion As String
WsRecordset.Open _
Source:="SELECT Count(dbo_F2KCube_Calls.CallID) " & _
"FROM dbutletProgram INNER JOIN dbo_F2KCube_Calls " & _
"ON dbutletProgram.OutletID = dbo_F2KCube_Calls.OutletID " & _
"WHERE (((dbo_F2KCube_Calls.Status) = 'e' Or (dbo_F2KCube_Calls.Status) = 'f') AND ((dbutletProgram.ProgramID)=12))" & _
"GROUP BY dbutletProgram.CustomChar5, dbo_F2KCube_Calls.CallCost " & _
"HAVING dbo_F2KCube_Calls.CallCost = " & intRound & " And dbutletProgram.CustomChar5 = '&strRegion&';"
Is there something wrong with my "having" clause
It returns a value when I just have the Round(intRound) alone, but when I include the Region(strRegion) it does not return any value. What am I doing wrong?
Dim intRound As Integer
Dim strRegion As String
WsRecordset.Open _
Source:="SELECT Count(dbo_F2KCube_Calls.CallID) " & _
"FROM dbutletProgram INNER JOIN dbo_F2KCube_Calls " & _
"ON dbutletProgram.OutletID = dbo_F2KCube_Calls.OutletID " & _
"WHERE (((dbo_F2KCube_Calls.Status) = 'e' Or (dbo_F2KCube_Calls.Status) = 'f') AND ((dbutletProgram.ProgramID)=12))" & _
"GROUP BY dbutletProgram.CustomChar5, dbo_F2KCube_Calls.CallCost " & _
"HAVING dbo_F2KCube_Calls.CallCost = " & intRound & " And dbutletProgram.CustomChar5 = '&strRegion&';"