Hi everybody,
I'm using VB and my code is below:
quantityRegion = DLookup("[Quantity]", "tblSalesData", "[regionCode] = " & i & " AND [Year] = " & yr)
If (IsNull(quantityRegion)) Then
'nothing
Else
'bunch of code
...
End If
Sometimes quantityRegion results in a Null value, and apparently I don't know how to deal with it. How can one maintain this control logic while replacing the line If (IsNull(quantityRegion)) Then with an alternate (correct) chunk of code? Any suggestions?
I'm using VB and my code is below:
quantityRegion = DLookup("[Quantity]", "tblSalesData", "[regionCode] = " & i & " AND [Year] = " & yr)
If (IsNull(quantityRegion)) Then
'nothing
Else
'bunch of code
...
End If
Sometimes quantityRegion results in a Null value, and apparently I don't know how to deal with it. How can one maintain this control logic while replacing the line If (IsNull(quantityRegion)) Then with an alternate (correct) chunk of code? Any suggestions?