0
votes

I have an Access 2010 form that is made up of a single-record parent form and a continuous subform. There is a a 1-to-many relationship between the tables behind the forms.

New parent table records can be added using the built-in record navigation buttons on the parent form, and child records can be added in the subform for the currently loaded parent record. If I leave focus in the subform when done entering child records and then click the new record button on the main form, focus stays in the subform.

How can I get focus to shift to a control in the main form? (so that I can begin inputting the new parent record info without having to manually click to it.)

I've searched around and tried putting SetFocus code in a couple different events but can't seem to get it.

1
no question mark found!Enamul Hassan
This question's tags are too general. Try adding at least "ms-access", and also mention Access in the title. You'll get a larger audience of people who might know the answer.ElmerCat

1 Answers

0
votes

The best place to put your setfocus statement would be in the oncurrent event of your main form (parent).