Something to think about, till the others come by :
You should have an empty table "MyTable" with fields "TheDate" & "Description".
Code:
Function populateMyTable()
Dim StartDate As Date
Dim EndDate As Date
Dim dbs As Database
Dim TheStateValues(0 To 3) As String ' Array of states
TheStateValues(0) = "Morning"
TheStateValues(1) = "AfterNoon"
TheStateValues(2) = "Evening"
TheStateValues(3) = "Night"
StartDate = #4/1/2012#
EndDate = #4/2/2012#
Set dbs = CurrentDb
NextDate = StartDate
For i = NextDate To EndDate
For Each varValue In TheStateValues
j = varValue
strsqlInsert = "insert into MyTable (TheDate, Description) VALUES (#" & NextDate & "#, '" & j & "')"
dbs.Execute (strsqlInsert)
Next varValue
NextDate = DateAdd("d", 1, NextDate)
Next
MsgBox ("Successful")
End Function
PS : I am on a negative scale as far as VBA is concerned, Just see if above gives you some ideas.
Thanks