Hi
Can anyone tell me why this isn't working
_____________
' Set [bCalPh] to YES for the specified Public Holiday
strSQL = "UPDATE [tblCalendar] SET [tblCalendar].[bCalPh] = Yes " & _
"WHERE ([tblCalendar].[dtmCalDate])=#" & [Forms]![frmPublicHoliday].[txtHolDay] & "#;"
cnn.Execute strSQL
MsgBox "The public holiday has been set.", vbOKOnly, "System information"
_________________
It appears to go through without any error and the message box comes up but when I go to tblCalendar the field bCalPh has not been changed to yes for the date I entered on the form.
I wondered if it was to do with date format where I had long date in tblCalendar but short date on the form so changed tblCalendar to short date but still it doesn't work.
Any thoughts or help greatly appreciated.
One day I might get the hang of this SQL stuff, if I don't snuff it first!!
Best wishes
Malcy
Can anyone tell me why this isn't working
_____________
' Set [bCalPh] to YES for the specified Public Holiday
strSQL = "UPDATE [tblCalendar] SET [tblCalendar].[bCalPh] = Yes " & _
"WHERE ([tblCalendar].[dtmCalDate])=#" & [Forms]![frmPublicHoliday].[txtHolDay] & "#;"
cnn.Execute strSQL
MsgBox "The public holiday has been set.", vbOKOnly, "System information"
_________________
It appears to go through without any error and the message box comes up but when I go to tblCalendar the field bCalPh has not been changed to yes for the date I entered on the form.
I wondered if it was to do with date format where I had long date in tblCalendar but short date on the form so changed tblCalendar to short date but still it doesn't work.
Any thoughts or help greatly appreciated.
One day I might get the hang of this SQL stuff, if I don't snuff it first!!
Best wishes
Malcy