I've tried that, still no joy, I'm trying to put the records directly into
the table, here's my code, hopefully it will shed some light on the
situation, thanks...
'Recurring Events
Private Sub btnReccure_Click()
Dim strSQL As String
Dim RTName As String
Dim STDate
Dim STTime As Date
Dim EDDate As Date
Dim EDTime As Date
Dim RTPrice As Single
Dim RTCustomer As String
Dim DayName As String
Dim NumOfDays As Integer
Dim i As Integer, k As Integer
Dim DoInsert As Boolean 'insert new record
Dim blnMon As Boolean
Dim blnTue As Boolean
Dim blnWed As Boolean
Dim blnThu As Boolean
Dim blnFri As Boolean
Dim blnSat As Boolean
Dim blnSun As Boolean
' get the values and store in variables so don't have to keep getting them
from the form
RTName = Me.txtName
STDate = Me.Date_From
STTime = Me.Time_From
EDDate = Me.Date_To
EDTime = Me.Time_To
blnMon = Me.Recurring_Monday
blnTue = Me.Recurring_Tuesday
blnWed = Me.Recurring_Wednesday
blnThu = Me.Recurring_Thursday
blnFri = Me.Recurring_Friday
blnSat = Me.Recurring_Saturday
blnSun = Me.Recurring_Sunday
Cost = Me.Cost
Room = Me.Room
Event_Summary = Me.Event_Summary
Client1_FirstName = Me.Client1_FirstName
Client1_Surname = Me.Client1_Surname
Client1_AddressLine1 = Me.Client1_AddressLine1
Client1_AddressLine2 = Me.Client1_AddressLine2
Client1_Town = Me.Client1_Town
Client1_PostCode = Me.Client1_PostCode
Client1_Tel1 = Me.Client1_Tel1
Client1_Tel2 = Me.Client1_Tel2
Client1_Fax = Me.Client1_Fax
Client1_EMail = Me.Client1_EMail
Client2_FirstName = Me.Client2_FirstName
Client2_Surname = Me.Client2_Surname
Client2_AddressLine1 = Me.Client2_AddressLine1
Client2_AddressLine2 = Me.Client2_AddressLine2
Client2_Town = Me.Client2_Town
Client2_PostCode = Me.Client2_PostCode
Client2_Tel1 = Me.Client2_Tel1
Client2_Tel2 = Me.Client2_Tel2
Client2_Fax = Me.Client2_Fax
Client2_EMail = Me.Client2_EMail
Number_Guests = Me.Number_Guests
Special_Requirements = Me.Special_Requirements
Catering_Notes = Me.Catering_Notes
Room_Layout = Me.Room_Layout
Booking_Date = Me.Booking_Date
STDate = Format(Date, "dd/mm/yyyy")
'number of days between start and end dates
NumOfDays = DateDiff("d", STDate, EDDate) + 1
k = 0
For i = 1 To NumOfDays
' basic SQL statement
strSQL = "INSERT INTO tblEvent (Name, Recurring_Monday, Recurring_Tuesday,
Recurring_Wednesday, Recurring_Thursday, Recurring_Friday,
Recurring_Saturday, Recurring_Sunday, Time_From, Time_To, Cost, Room,
Event_Summary, Client1_FirstName, Client1_Surname, Client1_AddressLine1,
Client1_AddressLine2, Client1_Town, Client1_PostCode, Client1_Tel1,
Client1_Tel2, Client1_Fax, Client1_EMail, Client2_FirstName, Client2_Surname,
Client2_AddressLine1, Client2_AddressLine2, Client2_Town, Client2_PostCode,
Client2_Tel1, Client2_Tel2, Client2_Fax, Client2_EMail, Number_Guests,
Special_Requirements, Catering_Notes, Room_Layout, Booking_Date, Date_From,
Date_To)"
strSQL = strSQL & " Values ('" & RTName & "', " & blnMon & ", " & blnTue &
", " & blnWed & ", " & blnThu & ", " & blnFri & ", " & blnSat & ", " & blnSun
& ", #" & STTime & "#, #" & EDTime & "#, '" & Cost & "', '" & Room & "', '" &
Event_Summary & "', '" & Client1_FirstName & "', '" & Client1_Surname & "',
'" & Client1_AddressLine1 & "', '" & Client1_AddressLine2 & "', '" &
Client1_Town & "', '" & Client1_PostCode & "', '" & Client1_Tel1 & "', '" &
Client1_Tel2 & "', '" & Client1_Fax & "', '" & Client1_EMail & "', '" &
Client2_FirstName & "', '" & Client2_Surname & "', '" & Client2_AddressLine1
& "', '" & Client2_AddressLine2 & "', '" & Client2_Town & "', '" &
Client2_PostCode & "', '" & Client2_Tel1 & "', '" & Client2_Tel2 & "', '" &
Client2_Fax & "', '" & Client2_EMail & "', '" & Number_Guests & "', '" &
Special_Requirements & "', '" & Catering_Notes & "', '" & Room_Layout & "'"
'MsgBox strSQL
'get the weekday name
DayName = WeekdayName(Weekday(STDate), True)
DoInsert = False
Select Case DayName
Case "MON"
If blnMon Then
strSQL = strSQL & ",'" & Booking_Date & "', #" & STDate & "#, #" & EDDate &
"#);"
DoInsert = True
k = k + 1
End If
Case "TUE"
If blnTue Then
strSQL = strSQL & ",'" & Booking_Date & "', #" & STDate & "#, #" & EDDate &
"#);"
DoInsert = True
k = k + 1
End If
Case "WED"
If blnWed Then
strSQL = strSQL & ",'" & Booking_Date & "', #" & STDate & "#, #" & EDDate &
"#);"
DoInsert = True
k = k + 1
End If
Case "THU"
If blnThu Then
strSQL = strSQL & ",'" & Booking_Date & "', #" & STDate & "#, #" & EDDate &
"#);"
DoInsert = True
k = k + 1
End If
Case "FRI"
If blnFri Then
strSQL = strSQL & ",'" & Booking_Date & "', #" & STDate & "#, #" & EDDate &
"#);"
DoInsert = True
k = k + 1
End If
Case "SAT"
If blnSat Then
strSQL = strSQL & ",'" & Booking_Date & "', #" & STDate & "#, #" & EDDate &
"#);"
DoInsert = True
k = k + 1
End If
Case "SUN"
If blnSun Then
strSQL = strSQL & ",'" & Booking_Date & "', #" & STDate & "#, #" & EDDate &
"#);"
DoInsert = True
k = k + 1
End If
End Select
If DoInsert Then
' MsgBox strSQL
'insert the record
CurrentDb.Execute strSQL
End If
'increment the date
STDate = DateAdd("d", 1, STDate)
Next i
MsgBox "Done! " & k & " records added."
End Sub