I have the following code, to try to add records to a date table. I simply want to add sequential dates up to an end date and the corresponding day names (later adding holidays and weekends, but keeping it simple for now). I get a SQL error when I run this.
Dim myday As Date
myday = #1/1/02#
While myday < #1/1/05#
DoCmd.RunSQL ("INSERT INTO Dates (Date) VALUES (myday)"
myday = myday + 1
Wend
Dim myday As Date
myday = #1/1/02#
While myday < #1/1/05#
DoCmd.RunSQL ("INSERT INTO Dates (Date) VALUES (myday)"
myday = myday + 1
Wend