Originally Posted by
Robyn_P
It's in the unload event.
It's an unbound form for data entry which has a subform and this field is used to link the subform records. Not sure if that's relevant.
Likely is, but without seeing your db impossible to say for sure. You might have a calculated control, or linked controls/fields (between main and subform) that has a reference that cannot be resolved because of the order of events. For example, a subform loads before a main form, so if you try to reference a main form during subform load, the main form isn't open so you can expect an error. Your solution might be to place your code elsewhere.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.