My program contains events, each event has several assignments (displayed on the same form, in a subform).
Each assignment has a checkbox, it's checked to send mail to "assignInCharge" to notify him about the assignment.
Also i have a checkbox "assignIsSent", which is supposed to be checked automatically after sending the first email
(when it's checked, it means the message will be a reminder). Here's the code:
Expand|Select|Wrap|Line Numbers
- Set rs = CurrentDb.OpenRecordset("SELECT assignInCharge, workerEmail, assignNum, assignDescription FROM tblAssignments, tblWorkers WHERE assignInCharge = workerNum AND assignSend = -1 AND assignNum = assignNum AND eventNum = " & strEventNum)
- Do While Not rs.EOF
- If assignIsSent = False Then
- If rs(1) & "" <> "" Then
- 'send first notification
- DoCmd.SendObject acSendNoObject, , , rs(1), , , "Hi, u've got an assignment " & rs(2) & " " & rs(3) & " as part of event " & strEventNum & " " & strEventDescription, strFilePath & "open_app.bat", False
- End If
- ......
how do i make this code reference only that specific assignment which i'm sending the mail about?
For instance, event 8 has 3 assignments. I choose the third one and check the checkbox.
But my condition " If assignIsSent = False Then" refers to the first assignment out of three existing, it doesn't know that i'm refering to the third line in the subform... How do i make him know that?
Sorry for the length.. i hope you understood my question.
Would appreciate any help, thanks