I have this in the AfterUpdate of a Text box (Format=Short Date)
Private Sub InptDate_AfterUpdate()
Dim inDate As Date
Dim iStart As Date
Dim iStop As Date
iStart = InptDate
iStop = iStart + 27
For inDate = iStart To iStop
strSQL = "INSERT INTO tblTimeSheet (wDate)VALUES (#" & Format(inDate, "d/m/yyyy") & "#);"
DoCmd.RunSQL strSQL
Next
End Sub
The following appears as the output in tblTimeSheet.
wDate
5/05/2008
5/06/2008
5/07/2008
5/08/2008
5/09/2008
5/10/2008
5/11/2008
5/12/2008
13/05/2008
14/05/2008
15/05/2008
16/05/2008
17/05/2008
18/05/2008
19/05/2008
20/05/2008
21/05/2008
22/05/2008
23/05/2008
24/05/2008
25/05/2008
26/05/2008
27/05/2008
28/05/2008
29/05/2008
30/05/2008
31/05/2008
6/01/2008
Its probably so simple....but I'm at a loss.
Can anyone help please.
Terre
Private Sub InptDate_AfterUpdate()
Dim inDate As Date
Dim iStart As Date
Dim iStop As Date
iStart = InptDate
iStop = iStart + 27
For inDate = iStart To iStop
strSQL = "INSERT INTO tblTimeSheet (wDate)VALUES (#" & Format(inDate, "d/m/yyyy") & "#);"
DoCmd.RunSQL strSQL
Next
End Sub
The following appears as the output in tblTimeSheet.
wDate
5/05/2008
5/06/2008
5/07/2008
5/08/2008
5/09/2008
5/10/2008
5/11/2008
5/12/2008
13/05/2008
14/05/2008
15/05/2008
16/05/2008
17/05/2008
18/05/2008
19/05/2008
20/05/2008
21/05/2008
22/05/2008
23/05/2008
24/05/2008
25/05/2008
26/05/2008
27/05/2008
28/05/2008
29/05/2008
30/05/2008
31/05/2008
6/01/2008
Its probably so simple....but I'm at a loss.
Can anyone help please.
Terre