Thank you for your response, I have found this information very helpful. I am still having problems getting this to work. When I try to test, by clicking on the checkbox in the form, I am getting a compile error - Sub or Function notdefined and the
Where is highlighted. Can you assist me further? Here is my code and additional information. Thank you for your assistance. Linnet
I have my form linked directly to my table (previously it was linked to a query). The form is set up to filter on MeetingDate is null. This is working.
Table Name = NewHireTable
Field Names = MeetingDate
MeetingBool - this is control source for my checkbox in the form - check75
Header,unbound textboc = text65
Private Sub Check75_Click()
Const MESSAGETEXT = "Date missing or invalid."
Me.Dirty = False
'ensure text box has a value and is a valid date
If IsDate(Me.Text65) Then
'build SQL statement to update table
strSQL = "UPDATE NewHireTable"
Set [NewHireTable].[MeetingDate] = "#" & Format(Text65, "mm-dd-yy") & "#"
Where [NewHireTable].[MeetingBool] = True
'execute SQL statement
CurrentDb.Execute strSQL, dbFailOnError
'build SQL statement to set Check56 column back to False
'in all rows ready for next update
strSQL = "UPDATE NewHireTable"
Set MeetingBool = False
'execute SQL statement
CurrentDb.Execute strSQL, dbFailOnError
Else
MsgBox MESSAGETEXT, vbExclamation, "Invalid operation"
End If
End Sub