Hi, Addy. I had already tried setting it to null but got the same error.
Hi, Remou. I have two NSN fields on the form. One originates with the NSN table and the other originates with the ReqnWatch table. When designing my form, Access named the fields [NSNs.NSN] and [ReqnWatch.NSN].
When I enter a stock number in the [ReqnWatch.NSN] field, the system looks for a match in the [NSNs.NSN] field (i.e., primary key in the NSN table). If it's not found, I move the value of the [ReqnWatch.NSN] field to a variable, clear that field, move the variable's value to the [NSNs.NSN] field and also back into the [ReqnWatch.NSN] field. This part works well.
If IsNull(Me![NSNs.NSN]) Then
MyNSN = Me![ReqnWatch.NSN]
Me![ReqnWatch.NSN] = ""
Me![NSNs.NSN] = MyNSN
Me![ReqnWatch.NSN] = MyNSN
End If
I don't understand why I can set the field to nothing in this snippet of code but not in the code I'm complaining about. They both reside in the BeforeUpdate event of the [ReqnWatch.NSN] field.