M
MHiemstra
Am confused on how to store a SQL Count to a variable...
What am I doing wrong here??
Dim intHelp_Id As Integer
intHelp_Id = DoCmd.RunSQL(" Count(SHD_CALL_LOG.HELP_ID) " & _
"FROM SHD_CALL_LOG " & _
"INNER JOIN SHD_CALL_STATUS_HISTORIES ON
(SHD_CALL_LOG.CALL_STATUS_ID = SHD_CALL_STATUS_HISTORIES.CALL_STATUS_ID) " &
_
"AND (SHD_CALL_LOG.HELP_ID =
SHD_CALL_STATUS_HISTORIES.HELP_ID) " & _
"WHERE
(((SHD_CALL_STATUS_HISTORIES.CALL_STATUS_ID)=[Forms]![SHD_HELP_LOG]![CALL_ST
ATUS_ID]));")
What am I doing wrong here??
Dim intHelp_Id As Integer
intHelp_Id = DoCmd.RunSQL(" Count(SHD_CALL_LOG.HELP_ID) " & _
"FROM SHD_CALL_LOG " & _
"INNER JOIN SHD_CALL_STATUS_HISTORIES ON
(SHD_CALL_LOG.CALL_STATUS_ID = SHD_CALL_STATUS_HISTORIES.CALL_STATUS_ID) " &
_
"AND (SHD_CALL_LOG.HELP_ID =
SHD_CALL_STATUS_HISTORIES.HELP_ID) " & _
"WHERE
(((SHD_CALL_STATUS_HISTORIES.CALL_STATUS_ID)=[Forms]![SHD_HELP_LOG]![CALL_ST
ATUS_ID]));")