Jobs
Author: Tom Date Submitted: 2/6/2005 Category: Database Compatibility: VB 6 This code has been accessed 10804 times.
Email Yourself this snippet:
Option Compare Database Option Explicit
Code
Sub Appointment() Dim d As Integer, h As Integer For d = 1 To 31 For h = 8 To 17 DoCmd.RunSQL "INSERT INTO Appointment (LessonDate,StartTime,EndTime) VALUES (#01/" & d & "/2005#,"#" & h & ":00#,#" & h+1 & ":00#)" Next h Next d End Sub