krishnanhemanth
Registered User.
- Local time
- Today, 14:41
- Joined
- Jun 12, 2009
- Messages
- 115
hi everybody
i have a form PURCHASE with a subform PURCHASE DETAILS.
in the subform there are the following fields
qty
tqd
status----- yes/no field
i have put the following code
Private Sub STATUS_GotFocus()
If Me.TQD = Me.QTY Then
Me.STATUS.Value = True
Else
Me.STATUS.Value = False
End If
End Sub
the problem is that in case the user misses to put focus on "status" then it is not updated..... so i put the below code
Private Sub Form_Close()
If Me.TQD = Me.QTY Then
If Me.STATUS.Value = False Then
MsgBox "SUPPLIED QTY HAS REACHED THE OREDER QTY"
End If
End If
End Sub
what i want is that if the above logic is true then
the form close event should cancel
the field "status" should get focus
the form can be closed only if the "status" field is updated
thanks in advance
hemanth
i have a form PURCHASE with a subform PURCHASE DETAILS.
in the subform there are the following fields
qty
tqd
status----- yes/no field
i have put the following code
Private Sub STATUS_GotFocus()
If Me.TQD = Me.QTY Then
Me.STATUS.Value = True
Else
Me.STATUS.Value = False
End If
End Sub
the problem is that in case the user misses to put focus on "status" then it is not updated..... so i put the below code
Private Sub Form_Close()
If Me.TQD = Me.QTY Then
If Me.STATUS.Value = False Then
MsgBox "SUPPLIED QTY HAS REACHED THE OREDER QTY"
End If
End If
End Sub
what i want is that if the above logic is true then
the form close event should cancel
the field "status" should get focus
the form can be closed only if the "status" field is updated
thanks in advance
hemanth