I have an inventory form where I have To and From fields (moving a device From somewhere To somewhere else). I have an unbound search field that sets up the form, and in the AfterUpdate I some house cleaning by moving the current To values to the From values, then clearing the To values with Null's.
In the form I want to ensure that the user puts information into the fields so I have tried to check the field value by:
Setting the Validation Rule (Is Not Null) & Validation Text - didn't work
Putting code into the Before Update event - didn't work
What am I missing? Why don't either of these two methods fire?
Rick
Code:
'Write To values then clear the values
Me.ImpactTicket = Null
Me.Status = Null
Me.FromBuilding = Me.ToBuilding
Me.ToBuilding = Null
Me.FromFloor = Me.ToFloor
Me.ToFloor = Null
Me.FromRoom = Me.ToRoom
Me.ToRoom = Null
In the form I want to ensure that the user puts information into the fields so I have tried to check the field value by:
Setting the Validation Rule (Is Not Null) & Validation Text - didn't work
Putting code into the Before Update event - didn't work
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me.ImpactTicket) Then
MsgBox "Please fill in the Impact Ticket."
Me.ImpactTicket.SetFocus
End If
End Sub
What am I missing? Why don't either of these two methods fire?
Rick