S
Shep99
On my form I have a field which 'if' updated, another field must be updated
before leaving the record.
For info (Report to Vo Date is the field that may get updated and Report
Number is the field that must be updated if the report to VO date is entered)
The event i have at the moment:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Len(Me.Reported_to_VO__date_) > 0 Then
If Len(Me.Report_Number & "") = 0 Then
msgbox "Enter Report number"
Me.Report_Number.SetFocus
Cancel = True
End If
End If
End Sub
Private Sub Reported_to_VO__date__AfterUpdate()
msgbox "Enter Report number"
Me.Report_Number.SetFocus
End Sub
The 'enter report number' error appears even before you have chance to enter
the number..........Can I change the time the message appears to when you try
and exit the record rather then straight away ?
before leaving the record.
For info (Report to Vo Date is the field that may get updated and Report
Number is the field that must be updated if the report to VO date is entered)
The event i have at the moment:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Len(Me.Reported_to_VO__date_) > 0 Then
If Len(Me.Report_Number & "") = 0 Then
msgbox "Enter Report number"
Me.Report_Number.SetFocus
Cancel = True
End If
End If
End Sub
Private Sub Reported_to_VO__date__AfterUpdate()
msgbox "Enter Report number"
Me.Report_Number.SetFocus
End Sub
The 'enter report number' error appears even before you have chance to enter
the number..........Can I change the time the message appears to when you try
and exit the record rather then straight away ?