Hi,
I'm have some VBA code which uses DAVG to calculate average of several columns in my table based on a column selected in a combo box, It then appends these averages to the same table using INSERT INTO. That all works UNTIL davg has a selection of null values and trys to pass a null to INSERT INTO which then spits the dummy.
So my question after that confusing paragraph is how can I deal with null values when using INSERT INTO. Also might be worth noting that the DAVG values are all assigned as variables before being inserted.
So my insert into looks something like:
Any help would be very much appreciated as I am stumped on this.
I'm have some VBA code which uses DAVG to calculate average of several columns in my table based on a column selected in a combo box, It then appends these averages to the same table using INSERT INTO. That all works UNTIL davg has a selection of null values and trys to pass a null to INSERT INTO which then spits the dummy.
So my question after that confusing paragraph is how can I deal with null values when using INSERT INTO. Also might be worth noting that the DAVG values are all assigned as variables before being inserted.
So my insert into looks something like:
Code:
CurrentDb.Execute "INSERT INTO Tester (StockPileID, Crushed_Ton, Fe_Per)VALUES ('" & StockPileCombo & "', " & StockPileDifference & ", " & FeAverage & ")"
Any help would be very much appreciated as I am stumped on this.