I'm trying to create a database based on the Northwind 2.0 Developer database, but capturing & displaying dates (including stock-take dates) in Medium format (dd-mmm-yy) instead of Short Format (as in Northwind).
I'm encountering a 'Invalid use of Null' error (Error 94) that point to the following line in the ProductLastStockTakeQuantity Function in Module modInventory.
ProductLastStockTakeQuantity = DLookup("intQuantityOnHand", "tblStockTakes", StringFormatSQL("intProductID_FK = {0} and dtStockTakeDate = CDate({1})", lngProductID, ToAccessDate(dtStockTakeDate)))
My best guess is that the error is due to dtStockTakeDate in an unexpected format. (Please correct me if I'm wrong).
How should I change this line of code to eradicate the error, please ? Thanks in advance.
I'm encountering a 'Invalid use of Null' error (Error 94) that point to the following line in the ProductLastStockTakeQuantity Function in Module modInventory.
ProductLastStockTakeQuantity = DLookup("intQuantityOnHand", "tblStockTakes", StringFormatSQL("intProductID_FK = {0} and dtStockTakeDate = CDate({1})", lngProductID, ToAccessDate(dtStockTakeDate)))
My best guess is that the error is due to dtStockTakeDate in an unexpected format. (Please correct me if I'm wrong).
How should I change this line of code to eradicate the error, please ? Thanks in advance.