I am struggling with this situation here for a while. I am a new user to access so pardon my ignorance. I have a continuous subform that has a number of checkboxes on there (hundreds). I would like include a single check box in the header of that form where I can select the checkbox to check or uncheck all the checkboxes in the form.
This is the code I have in my After update Event Procedure (I receive code from another source). Needless to say, my codes are not working. My table name is Report_Dimensions and the field name for the checkboxes is Report. I have no idea what the DBEngine line does, like I said I borrowed these codes from another online source. Please advice. Thanks a lot.
Private Sub chkDoEmAll_AfterUpdate()
Dim strSQL As String
'Save any edits to avoid concurrency issues.
If Me.Dirty Then
Me.Dirty = False
strSQL = "UPDATE Report_Dimensions SET Report = " & _
Me.chkDoEmAll.Value & " WHERE Report = " & _
Me.chkDoEmAll.Value & ";"
DBEngine(0)(0).Execute strSQL, dbFailOnError
'Requery the form.