Hi,
I am currently trying to create a simple form that is dummy proof to update associates vacation time. However, the code is receiving a compile error: Sub or Function not defined when ran. I have 2 combo box's and one text box on the form.
Please any ideas!?
Code:
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("Tbl_Associate", dbOpenDynaset)
rst.FindFirst "[NBKID] = '[Forms]![Frm_UpdateAssociatesTime]![comboNBK]'"
rst.Edit
If [Forms]![Frm_UpdateAssociatesTime]![Combo6] = "Vacation" Then
rst![Current Vacation Available] = Sum(rst![Current Vacation Available] - [Forms]![Frm_UpdateAssociatesTime]![Text14])
rst![Vacation Used] = Sum(rst![Vacation Used] + [Forms]![Frm_UpdateAssociatesTime]![Text14])
rst.Update
End If
rst.Close
Set rst = Nothing