I'm trying to simplify the input by users with a code. It's difficult to explain the process so I show you what I mean.
The user only has to Input the following values:
Event: event1
From: 01.01.2017 To: 01.04.2017
Cost: 5000
Result in the Table:
event1 01.01.2017 5000
event1 01.02.2017 5000
event1 01.03.2017 5000
event1 01.04.2017 5000
I tried it with this code:
Private Sub Save_Click()
Dim strSQL As String
Dim Period As Date
For Period = "' & Me!FromDate & '" To "' & Me!ToDate & '"
strSQL = "INSERT INTO tblEvents (EventName, Date, Costs) VALUES ('" & Me!EventName& "' , '" & Date & "', '" & Me!Costs& "')"
CurrentDb.Execute strSQL
Next Date
End Sub