• Familiarize yourself with the SQL function isnull().

    When comparing a field which may have a null value, instead of = CustomerID

    use = isnull(CustomerID, '')

    which means: If the customerid is null, treat it as '', an empty string.

    Good Luck