• Sean, I devised a VBA procedure that creates SQL Code. I tried running the code below and look at the results following.

    Select count(*), 'Update' as SQLName from VehiclesToUpdate Where Region='Central' And ProgYear='12' And LeaseCycle='1'And ModelName='GRCHEROKE LAR 4' And MFG='CHR' And RiskNonRiskFlag='R'

    GO

    Select Sum(UnitCount), 'RCount' as SQLName from ReturnsPros Where Region='Central' And ProgYear='12' And LeaseCycle='1'And ModelName='GRCHEROKE LAR 4' And MFG='CHR' And RiskNonRiskFlag='R'

    GO

    Select count(*), 'Detail' as SQLName from VehicleDetail Where Region='Central' And ProgYear='12' And LeaseCycle='1'And ModelName='GRCHEROKE LAR 4' And MFG='CHR' And RiskNonRiskFlag='R'

    GO

    VehiclesToUpdate: 101

    ReturnsPros: 101

    VehicleDetail: 46

    I'm trying to think of a way to change VehiclesToUpdate. There are obvioiusly not enough records to accomodate ReturnsPros.