Subform, new record, Focus goes to last field on next subform entry

  • Thread starter Thread starter Nigel Greenwood via AccessMonster.com
  • Start date Start date
N

Nigel Greenwood via AccessMonster.com

Hi
I have a main form and subform,I want a new record to initiate on entry
into the subform, which I have on current event of the subform with
DoCmd.GoToRecord , , acNewRec

This takes me to the first field in the dataview and I can tab through the
fields.

If I tab through though the record and, ADD NO DATA, eventually control
passes back to the main form.

PROBLEM
on control passing again back to the subform, the focus is now on the last
field in the subform and I have to use keyboard back arrow buttons to get
back to the first field.

Any help appreciated Nigel
 
Hi Nigel,

depending on what you are doing do one of the following

in the sub form code events

either

'On Current' or 'Got Focus' or 'Activate' events

me.txtMyFirstTextBox.setfocus

you will need to test to see which gives you the solution you require.
 
Back
Top