MajP
You've got your good things, and you've got mine.
- Local time
- Today, 16:34
- Joined
- May 21, 2018
- Messages
- 8,527
I did not get an error which means it is likely a timing issue. When you load a subform, it loads before the main form. So this event could occur before the parent form is loaded, and give you an error. Probably something like object does not exist.
You might get lucky by adding Do events. In other words before that code fires it will give resources back to the other events to occur. Or just ignore the error. In that case the subform event will occur and the error will be ignored, but the event will fire again and work once the main loads.
Private Sub Form_Current()
DoEvents
On Error Resume Next
Me.Parent.txtLinkCons = Me.cons
End Sub
You might get lucky by adding Do events. In other words before that code fires it will give resources back to the other events to occur. Or just ignore the error. In that case the subform event will occur and the error will be ignored, but the event will fire again and work once the main loads.
Private Sub Form_Current()
DoEvents
On Error Resume Next
Me.Parent.txtLinkCons = Me.cons
End Sub