Now I'm getting a mismatch error. Well, the reason for me converting the field to ShortDate was because my query didn't return what I was asking. I am grabbing dates from multiple tables each table's datetime format is different. When I query for today's date, it only returns the dates with the short date format. All the other dates with the time are left out. That's the reason I want to format the field. If there is another way, please let me know.
this is my code for the query
Function BuildSQLStatement(strSQL As String) As Boolean
Dim strSELECT As String
Dim strFROM As String
Dim strWHERE As String
Dim strORDERBY As String
Dim strGROUPBY As String
txtReportName = "Out Bound Calls"
strReportName = "Calls"
strSELECT = "A.Call_Status_Desc, Sum(A.CountOfCall_Status_Desc) AS SumOfCountOfCall_Status_Desc, A.USER_ID, " & _
"A.USER_FN, A.USER_LN, A.DB_TABLE "
strFROM = "qdfCountUserCallStatus AS A "
strFROM = strFROM & "GROUP BY A.Call_Status_Desc, " & _
"A.USER_ID, A.USER_FN, " & _
"A.USER_LN, A.DB_TABLE, A.MEMBERCALLEDDTE, " & _
"HAVING (((A.MEMBERCALLEDDTE)>=#" & cboStartDate & _
"# And (A.MEMBERCALLEDDTE)<=#" & cboEndDate & "#));"
strSQL = "SELECT " & strSELECT
strSQL = strSQL & "FROM " & strFROM
If strWHERE <> "" Then
strSQL = strSQL & "WHERE " & strWHERE
BuildSQLStatement = True
End Function