S
Steve
I have a temporary table (tblQualifications) with
attributes [name][rdo1][rdo2][rdo3][rdo4][rdo5][rdo6]and
[rdo7]. The rdo fields correspond to the day of the week
and is true (-1) if it is the employees regular day off.
When I select a date the calendar on a form, if I select
a saturday I want all individuals who are off on
saturday, [rdo7]= -1 to be deleted. I tried the
following code but I get an error (compile error - Sub or
Function not defined) The error happens on the
first "Delete" command.
I am new to this and could really use some help.
Thanks a lot!!!
Private Sub TEST_Click()
Dim intRDO As Integer
intRDO = DatePart("w", [Forms]![frmDeptShiftSELECT]!
[CalValue])
Select Case intRDO
Case 1
Delete tblQualifications.[Empl Nbr]
FROM tblQualifications
WHERE (((tblQualifications.RDOsun) = -1))
Case 2
Delete tblQualifications.[Empl Nbr]
FROM tblQualifications
WHERE (((tblQualifications.RDOmon) = -1))
Case 3
Delete tblQualifications.[Empl Nbr]
FROM tblQualifications
WHERE (((tblQualifications.RDOtue) = -1))
Case 4
Delete tblQualifications.[Empl Nbr]
FROM tblQualifications
WHERE (((tblQualifications.RDOwed) = -1))
Case 5
Delete tblQualifications.[Empl Nbr]
FROM tblQualifications
WHERE (((tblQualifications.RDOthu) = -1))
Case 6
Delete tblQualifications.[Empl Nbr]
FROM tblQualifications
WHERE (((tblQualifications.RDOfri) = -1))
Case 7
Delete tblQualifications.[Empl Nbr]
FROM tblQualifications
WHERE (((tblQualifications.RDOsat) = -1))
End Select
End Sub
attributes [name][rdo1][rdo2][rdo3][rdo4][rdo5][rdo6]and
[rdo7]. The rdo fields correspond to the day of the week
and is true (-1) if it is the employees regular day off.
When I select a date the calendar on a form, if I select
a saturday I want all individuals who are off on
saturday, [rdo7]= -1 to be deleted. I tried the
following code but I get an error (compile error - Sub or
Function not defined) The error happens on the
first "Delete" command.
I am new to this and could really use some help.
Thanks a lot!!!
Private Sub TEST_Click()
Dim intRDO As Integer
intRDO = DatePart("w", [Forms]![frmDeptShiftSELECT]!
[CalValue])
Select Case intRDO
Case 1
Delete tblQualifications.[Empl Nbr]
FROM tblQualifications
WHERE (((tblQualifications.RDOsun) = -1))
Case 2
Delete tblQualifications.[Empl Nbr]
FROM tblQualifications
WHERE (((tblQualifications.RDOmon) = -1))
Case 3
Delete tblQualifications.[Empl Nbr]
FROM tblQualifications
WHERE (((tblQualifications.RDOtue) = -1))
Case 4
Delete tblQualifications.[Empl Nbr]
FROM tblQualifications
WHERE (((tblQualifications.RDOwed) = -1))
Case 5
Delete tblQualifications.[Empl Nbr]
FROM tblQualifications
WHERE (((tblQualifications.RDOthu) = -1))
Case 6
Delete tblQualifications.[Empl Nbr]
FROM tblQualifications
WHERE (((tblQualifications.RDOfri) = -1))
Case 7
Delete tblQualifications.[Empl Nbr]
FROM tblQualifications
WHERE (((tblQualifications.RDOsat) = -1))
End Select
End Sub