Code:
Dim dbCurr As DAO. Database
Dim rsLate as DAO.Recordset
Dim lateStr, cidrThreatStr as String
Dim tmpCIDRCount, tmpJCRBValid, tmpRASA, tmpRASAHold, tmpCRIB, tmpCRIBHold, tmpDevHold, tmpTandE, tmpTandEHold, tmpReadyforAccept as long
response = MsgBox("Have you selected the threat topic and information cutoff date?", vbYesNo + vnCritical + vbDefaultButton2, "Generate CIDR Snapshot Confirmation")
If response = vbNo Then
Exit Sub
End If
Set DbCurr = CurrentDb()
lateStr = "Select CdgrToCidr.[CDGR ID#], FulfillmentGroup.[Fulfillment Group], CnfToThreat.[Threat Adversary], Cnf.Status, Cnf.[Need By Date] " _
& "FROM (((Cnf INNER JOIN CnfToCdgr ON Cnf.[CNF ID#] = CnfToCdgr.[Cnf ID#]) LEFT JOIN CnfToThreat ON Cnf.[CNF ID#] = CnfToThreat.[Cnf ID#]) " _
& "INNER JOIN CdgrToCidr ON CnfToCdgr.[CDGR ID#] = CdgrToCidr.[CDGR ID#]) INNER JOIN FulfillmentGroup ON CdgrToCidr.[Fulfillment Status] = FulfillmentGroup.[Fulfillment Status] " _
& "GROUP BY CdgrToCidr.[CDGR ID#], FulfillmentGroup.[Fulfillment Group], CnfToThreat.[Threat Adversary], Cnf.Status, Cnf.[Need By Date] " _
& "HAVING ((CdgrToCidr.[Fulfillment Status] Not Like 'Rejected*') AND ((Cnf.Status) Like 'JCRB Validated*'));"
cidrThreatStr = Me.cmdSelThreatTopic.Value
If (cidrThreatStr = "Other" Or cidrThreatStr = "Agnostic" Or cidrThreatStr = "All") Then
lateSTr = lateSTr & " And CnfToThreat.[Threat Adversary] Not Like 'CHN' AND " _
& "CnfToThreat.[Threat Adversary] Not Like 'IRN' AND " _
& "CnfToThreat.[Threat Adversary] Not Like 'PRK' AND " _
& "CnfToThreat.[Threat Adversary] Not Like 'RUS' AND " _
& "CnfToThreat.[Threat Adversary] Not Like 'VEO' AND " _
Else
lateStr = lateStr & " AND CnfToThreat.[Threat Adversary] = '" & cidrThreatStr & "'"
End If
So this is my start. I want to run through and count the items by their fulfillment group status and record it in a table i created so I can look at the numbers for a later item.
I was told i can create a record set to do this but i don't know how to do that.