Chris, Can you post your latest database with the revisions you have made? jdraw, I have attached the database. The 'Quantity_On_Hand_All_Products_Query' is the one with the custom function. Thanks for your help, Chris