Hope someone can assist with this irritating problem.
I have a form (frmA) with a subForm (frmB). As the user moves through the various controls popups appears with the available options for that text box - txtTotalLength (eg for situation XYZ the values are 1,2 or 3). This popup is for information only as the user must enter the required option in the text box.
I have the popup appearing on screen OK using an "on enter" event but I cannot set the focus back to the text box so the user can enter the appropriate value.
I may not have made myself clear. The popup is to remain on screen until the user has entered the appropriate data in the control on the subform. Incidently the subforms (there are a number of them) are inside a tab control.
After data is entered and the user moves to the next control the first popup is closed and another appears with information for the next textbox. The opening and closing of popups is working well, it is just getting the focus back to the subform control that is causing problems
I tried using setfocus on a small test database and it worked perfectly.
Private Sub Name_Enter()
When I tried used the main form and the subform that is in a tab control the focus remains with the popup until I click on the textbox. I am sure that I am not using the correct code to access this subform inside the tab control. Could you help with some suggested code to access the subform.
Isn't there something like uh.... PreviousControl.SetFocus or something like that? Well, that and referencing the form as well? I saw something like that and wasn't clear on how it was to be used. Just checking.