Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Function isFullCheck(strInspectors As Variant, strRequired As Variant) As Boolean
Dim aRequired() As String
Dim req As Variant
isFullCheck = True
If Not IsNull(strInspectors) And Not IsNull(strRequired) Then
aRequired = Split(strRequired, ",")
For Each req In aRequired
If Nz(InStr(strInspectors, req), 0) = 0 Then
isFullCheck = False
Exit Function
End If
Next req
End If
End Function
However that is out of habit. I have already ensured that neither string 1 or 2 can be null so it is redundant.string1 is zero-length 0
string1 is Null Null
string2 is zero-length start
string2 is Null Null
string2 is not found 0
string2 is found within string1 Position at which match is found
start > string2 0
Public Function isFullCheck(strInspectors As Variant, strRequired As Variant) As Boolean
Dim aRequired() As String
Dim req As Variant
If Not IsNull(strInspectors) And Not IsNull(strRequired) Then
isFullCheck = True
aRequired = Split(strRequired, ",")
For Each req In aRequired
If Nz(InStr(strInspectors, req), 0) = 0 Then
isFullCheck = False
Exit Function
End If
Next req
End If
End Function
SELECT DISTINCT
tblRequiredInspection.productID,
"Full Check Not Performed" AS Status
FROM
tblRequiredInspection
LEFT JOIN
tblPerformedInspections ON (tblRequiredInspection.inspector = tblPerformedInspections.INSPECTORCHECKED) AND (tblRequiredInspection.productID = tblPerformedInspections.productID)
WHERE
tblPerformedInspections.INSPECTORCHECKED Is Null
SELECT DISTINCT
tblRequiredInspection.productID,
"Full Check Performed" AS Status
FROM
tblRequiredInspection
WHERE
tblRequiredInspection.productID Not In (select ProductID from qryFullCheckNotPerformed)
SELECT
productID,
Status
FROM
qryFullCheckPerformed
UNION SELECT
productID,
Status
from
qryFullCheckNotPerformed;