Locopete99
Registered User.
- Local time
- Yesterday, 18:38
- Joined
- Jul 11, 2016
- Messages
- 163
Hi,
I have a database that will be dealing with customer usage forecasts on stock. As such they will give 12 month projections on the stock they require.
I have a form that will be filled in on site by the sales rep, but is there a way to make the total field auto sum after update of the last month?
I have a table called tbl_forecast which has 12 months spaces to complete the forecast ( called Month 1, Month 2.... etc) and the total (being Total) and Blanket_Agreement_Number to make sure it sums only the record in question
My current attempt was to try and create an auto populate using a dsum
Can someone advise where it is going wrong??
I have a database that will be dealing with customer usage forecasts on stock. As such they will give 12 month projections on the stock they require.
I have a form that will be filled in on site by the sales rep, but is there a way to make the total field auto sum after update of the last month?
I have a table called tbl_forecast which has 12 months spaces to complete the forecast ( called Month 1, Month 2.... etc) and the total (being Total) and Blanket_Agreement_Number to make sure it sums only the record in question
My current attempt was to try and create an auto populate using a dsum
Code:
Set rsTotal = CurrentDb.OpenRecordset("Tbl_Forecast", dbOpenDynaset)
With rsTotal
.AddNew
![Total] = DSum([Month1]+[Month2]+[Month3]+[Month4]+[Month5]+[Month6]+[Month7]+[Month8]+[Month9]+[Month10]+[Month11]+[Month12], "Tbl_Forecast", [Blanket Agreement Number]=" & "'" & [Blanket Agreement Number] & "'")
Can someone advise where it is going wrong??