I have a continuous subform in which I’ve placed a small transparent command button as the last control in the tab order.
The purpose is to return the focus to a control on the parent form when a user has completed entry of a row in the subform.
In its on got focus event I have the following code
If IsLoaded("frmSupporter") Then Me.Parent!txtSearch = Null Me.Parent!txtSearch.SetFocus End If
it puts the focus where I want it but has the unwelcome side effect of locking the subform and I can’t see why. I’ve traced the code and there is nothing in any event that fires during the process – Subform’s before or after update etc and can find nothing that should cause this. I’ve even checked the subform’s enables and locked properties in the immediate window and they are as they should be.
I tried the code in the lost focus of the previous control, the click event of the button and the afterupdate event of the form and it works fine but just doesn’t give me the right navigation.
I tried using a text box instead of the button with the same result so it seems to be the got focus event that is the problem.
Any ideas, anyone?