G
Guest
I would like an event that when triggered will change the values of a column in my table to all true or all false (toggle). This event will be controlled by a check box.
Tim Ferguson gave give some code that works but generates an error message when the event is triggered a second time
Here's what I hav
****************code starts her
Private Sub Check8_Click(
If Me.Check8 = True The
a = Tru
Els
a = Fals
End I
strSQL = "UPDATE [tbl_Risk Assessment]" & vbNewLine & "SET [Include In Report]=" & a & ";
CurrentDb.Execute strSQL, dbFailOnErro
Me.List2.Requery 'Refreshes the info contained in the list bo
Ens su
*************Code end her
The problem I'm having is that it works find the first time I select the check box but if I choose, for whatever reason, to select it a second time an error/warning message pop up stating: "The data has been changed. Another user edited this record and saved the changes before you attemped to save your changes. Re-edit the record." (VBOKOnly
How do I get around this? I would like the user, should they choose, to be able to keep selecting the chceck box without generating any error messages. From what I get from the message, I need to save the table after modifying it the first time. How can I do that? I am unfamiliar with the
Thank you
Daniel
Tim Ferguson gave give some code that works but generates an error message when the event is triggered a second time
Here's what I hav
****************code starts her
Private Sub Check8_Click(
If Me.Check8 = True The
a = Tru
Els
a = Fals
End I
strSQL = "UPDATE [tbl_Risk Assessment]" & vbNewLine & "SET [Include In Report]=" & a & ";
CurrentDb.Execute strSQL, dbFailOnErro
Me.List2.Requery 'Refreshes the info contained in the list bo
Ens su
*************Code end her
The problem I'm having is that it works find the first time I select the check box but if I choose, for whatever reason, to select it a second time an error/warning message pop up stating: "The data has been changed. Another user edited this record and saved the changes before you attemped to save your changes. Re-edit the record." (VBOKOnly
How do I get around this? I would like the user, should they choose, to be able to keep selecting the chceck box without generating any error messages. From what I get from the message, I need to save the table after modifying it the first time. How can I do that? I am unfamiliar with the
Thank you
Daniel