jocelyn_ooi
Registered User.
- Local time
- Yesterday, 19:45
- Joined
- Sep 27, 2011
- Messages
- 17
hei there... wanna ask for help... i want to set the date for apply leave. the following is my code. There have 1 problem when i apply leave for example start date is 12-09-2011 and end date is 17-09-2011. After that i try apply a new leave on 15-09-2011. Suppose the system should pop out "You have already applied this leave before!" since 15-09-2011 already applied before... but the leave still applied successfully. it only will pop out that message when i set the start date on 12-09-2011. it can't involve the date between 12-09-2011 till 17-09-2011.. somebody please help me solve this problem!!!!
If ((varStartDate > 0) Or (varEndDate > 0)) And ((IsNull(Me.cmb_halfday_option) Or Me.cmb_halfday_option = "") Or (varSameHalfday > 0)) Then
MsgBox "You have already applied this leave before !", vbExclamation
Forms!frmLeaveApply!cmdBack.SetFocus
GoTo cmdApply_Click_Exit
End If
If ((varStartDate > 0) Or (varEndDate > 0)) And ((IsNull(Me.cmb_halfday_option) Or Me.cmb_halfday_option = "") Or (varSameHalfday > 0)) Then
MsgBox "You have already applied this leave before !", vbExclamation
Forms!frmLeaveApply!cmdBack.SetFocus
GoTo cmdApply_Click_Exit
End If
Last edited: