these tables:
tClasses
----------
ClassID (autonum)
ClassName
DateStart
DateEnd
Instructor
tWorkouts
-------------------
WorkID (auto)
ClassID (long)
ClassDate
tClassRoster
---------------
RosterID (autonum)
ClassID (long) FK from tClasses
NameID
tNames
--------------
NameID
FirstName
LastNAme
Address
then in a form , put text boxs for StartDate and EndDate
and a button to execute
in the button CLICK event paste this code for it to run
Code:
Public Sub AddDateRecs()
Dim vDate
Dim sSql As String
DoCmd.SetWarnings False
vDate = txtStartDate
GoSub PostDate 'post 1st day
If Format(vDate, "ddd") <> "Wed" Then
'get 1st wednesday
While Format(vDate, "ddd") <> "Wed"
vDate = DateAdd("d", 1, vDate)
Wend
GoSub PostDate
End If
'post EVERY wednesday
While vDate < txtEndDate
vDate = DateAdd("d", 7, vDate)
GoSub PostDate
Wend
DoCmd.SetWarnings True
Exit Sub
PostDate:
sSql = "insert into tWorkouts ClassDate ([ClassDate]) VALUES (" & vDate & ")"
DoCmd.RunSQL sSql
Return
End Sub