MattioMatt
Registered User.
- Local time
- Today, 13:08
- Joined
- Apr 25, 2017
- Messages
- 99
I'm trying to count rows that equal a value from 3 tables linked to another table and I'm having trouble.
I have the following:
tblAssets
AssetID | IP Address | Asset Name
tblVuln_A (Relationship 1-M from IP in Assets Table)
VulnID | IP Address | VulnTitle | Severity (Number 4 or 5)
tblVuln_B (Relationship 1-M from IP in Assets Table)
VulnID | IP Address | VulnTitle | Severity (Number 4 or 5)
tblVuln_C (Relationship 1-M from IP in Assets Table)
VulnID | IP Address | VulnTitle | Severity (Number 4 or 5)
I have a continuous form at the moment that is based on a union query for listing all entries from any of the 3 tables. I'd like to put a textbox on the form to count the number of Sev5's then another for counting the total number of Sev4's against the asset the form has been opened for.
I've created a pair of queries for each of the Vuln tables to pull records where Sev 4 or 5 then crearted a pair of union all queries to pull it in from all 3 tables.
Example:
The problem I have is trying to count up the rows from the union queries and add it to a bound continuous form (form is bound to a union all to list all the vulnerability records relating to an asset).
I've tried using an expression but it doesn't seem to be working as it is giving me incorrect results.
Any help most appreciated.
I have the following:
tblAssets
AssetID | IP Address | Asset Name
tblVuln_A (Relationship 1-M from IP in Assets Table)
VulnID | IP Address | VulnTitle | Severity (Number 4 or 5)
tblVuln_B (Relationship 1-M from IP in Assets Table)
VulnID | IP Address | VulnTitle | Severity (Number 4 or 5)
tblVuln_C (Relationship 1-M from IP in Assets Table)
VulnID | IP Address | VulnTitle | Severity (Number 4 or 5)
I have a continuous form at the moment that is based on a union query for listing all entries from any of the 3 tables. I'd like to put a textbox on the form to count the number of Sev5's then another for counting the total number of Sev4's against the asset the form has been opened for.
I've created a pair of queries for each of the Vuln tables to pull records where Sev 4 or 5 then crearted a pair of union all queries to pull it in from all 3 tables.
Example:
Code:
Select * from qryVuln_ASev5
UNION ALL Select * from qryVuln_BSev5
UNION ALL Select * from qryVuln_CSev5
The problem I have is trying to count up the rows from the union queries and add it to a bound continuous form (form is bound to a union all to list all the vulnerability records relating to an asset).
I've tried using an expression but it doesn't seem to be working as it is giving me incorrect results.
Any help most appreciated.