L
lsyrkin
I got stuck in a task that seemed to be very simple. I have a form with
a subform (A) containing several nested subforms(B,C,D...) in
Access2000. Two of these nested subforms contain times that I want to
compare and give a warning message when it is out of range. I created a
calculated field called Uptk in A:
Uptk=DateDiff("n",[sfrmInjTracer].[Form]![InjTime],[sfrmScan].[Form]![StTime])
Then I tried to create a message box in BeforeUpdate or AfterUpdate on
Uptk :
If 50 > Me![Uptk] Or Me![Uptk] > 70 Then
MsgBox ("Uptake time is out of range! Please provide comment.")
End If
Nothing works, though DblClick event works fine:
Private Sub Uptk_DblClick(Cancel As Integer)
If 50 > Me![Uptk] Or Me![Uptk] > 70 Then
MsgBox ("Uptake time is out of range! Please provide comment.")
End If
End Sub
I really want the message to popup without any additional user 'clicks'
- just after Uptk calculation.
Will appreciate any advice on this matter.
Leonid
a subform (A) containing several nested subforms(B,C,D...) in
Access2000. Two of these nested subforms contain times that I want to
compare and give a warning message when it is out of range. I created a
calculated field called Uptk in A:
Uptk=DateDiff("n",[sfrmInjTracer].[Form]![InjTime],[sfrmScan].[Form]![StTime])
Then I tried to create a message box in BeforeUpdate or AfterUpdate on
Uptk :
If 50 > Me![Uptk] Or Me![Uptk] > 70 Then
MsgBox ("Uptake time is out of range! Please provide comment.")
End If
Nothing works, though DblClick event works fine:
Private Sub Uptk_DblClick(Cancel As Integer)
If 50 > Me![Uptk] Or Me![Uptk] > 70 Then
MsgBox ("Uptake time is out of range! Please provide comment.")
End If
End Sub
I really want the message to popup without any additional user 'clicks'
- just after Uptk calculation.
Will appreciate any advice on this matter.
Leonid