Checkbox select all
Hi
I inherited a database and changed a few things to make it a bit more user friendly. So I didn't lose any of the old database I made a duplicate but now the "select all check box" won't work. The check box is meant to select all records in a sub form. Here is the code:
Private Sub AllDivisionsCheckbox_AfterUpdate()
Dim SQL As String
Me.Refresh
DoCmd.SetWarnings False
If Me![AllDivisionsCheckBox] = True Then
SQL = "UPDATE tblAllDivisions SET tblAllDivisions.[Coord request no] = Forms![frmCoordReq Form]![Coord request no];"
DoCmd.RunSQL SQL
SQL = "INSERT INTO tblDivisionsRequested ( [Div request sent to], [Coord request no] )SELECT tblAllDivisions.[Div/State abbreviation], tblAllDivisions.[Coord request no] FROM tblAllDivisions;"
DoCmd.RunSQL SQL
End If
DoCmd.SetWarnings True
End Sub
Private Sub subformDivisionsRequested_Query_Enter()
Me.Refresh
End Sub
Private Sub subformDivisionsRequested_Query_Exit(Cancel As Integer)
Me.Requery
End Sub
The checkbox works fine on the old database and all the tables, queries and forms have the same names in the new one.
Can anyone see my problem??
Can anyone please help me??
Thanks
|