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

  • Thread starter Nigel Greenwood via AccessMonster.com
  • 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
 
A

Alex White MCDBA MCSE

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top