C
Corrine
AssignedEquipmentType and AssignedEquipment are text data type. Both are unique
five character codes. I have both fields in a continuous form. The database
requires that if an Equipment type is entered, an equipment item must also be
entered. I have the following code' to handle the case if AssignedEquipmentType
has been highlighted and deleted that AssignementEquipment must be set to Null.
When the code runs, I get error 3162 - You tried to assign the Null value to a
variable that isn't a Variant data type. Can someone help me to resolve the
problem.
Private Sub AssignedEquipmentType_AfterUpdate()
On Error GoTo ErrorHandler
If IsNull(Me!AssignedEquipmentType) Then
Me!AssignedEquipment = Null
Me!AssignedEquipmentType.SetFocus
Exit Sub
End If
End Sub
Thanks for your help!
Corrine
five character codes. I have both fields in a continuous form. The database
requires that if an Equipment type is entered, an equipment item must also be
entered. I have the following code' to handle the case if AssignedEquipmentType
has been highlighted and deleted that AssignementEquipment must be set to Null.
When the code runs, I get error 3162 - You tried to assign the Null value to a
variable that isn't a Variant data type. Can someone help me to resolve the
problem.
Private Sub AssignedEquipmentType_AfterUpdate()
On Error GoTo ErrorHandler
If IsNull(Me!AssignedEquipmentType) Then
Me!AssignedEquipment = Null
Me!AssignedEquipmentType.SetFocus
Exit Sub
End If
End Sub
Thanks for your help!
Corrine