Hello All,
I have a table "LightDuty" with a field [Email Sent] that is a YES/NO field.
I do not have a checkbox on the main form for the [Email Sent]; instead this field is checked (in the table) when the user sends an email to the receipient. I use the [Email Sent] field as a criteria for my query.
Ok, now what I am looking to do:
I need to uncheck the checkbox when the user changes the date in a field called [Drs Excuse Exp].
This is what I have tried (in the AfterUpdate event of the Drs Excuse Exp control):
I get the runtime error 3265 "Item not found in collection"
Any help would be appreciated.
I have a table "LightDuty" with a field [Email Sent] that is a YES/NO field.
I do not have a checkbox on the main form for the [Email Sent]; instead this field is checked (in the table) when the user sends an email to the receipient. I use the [Email Sent] field as a criteria for my query.
Ok, now what I am looking to do:
I need to uncheck the checkbox when the user changes the date in a field called [Drs Excuse Exp].
This is what I have tried (in the AfterUpdate event of the Drs Excuse Exp control):
Code:
Dim db as DAO.Database
Dim rs as DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("LightDuty")
With rs
.Edit
.Fields([Email Sent]) = False
.Update
End With
rs.Close
db.Close
Set rs = Nothing
Set db = Nothing
Exit Sub
I get the runtime error 3265 "Item not found in collection"
Any help would be appreciated.