Changing focus tfrom subform to main form on update

Z

Zippy

I have a form entering membership details. I have a
subform for entering additional names of family members.
When I click on the arrow for the next record the focus
remains where it was in the subform. Does anyone know how
to make the focus go back to the first field in the main
form. Many thanks for any help
 
B

Brian

Best way is to specifically tell Access what field you
want to set the focus on and set this command in the On
Exit event of the subform. Use the syntax Forms!
[FormName].[FieldName].setfocus (the autohelp will correct
if I've mistyped anything).

Hope this helps.
 
G

Guest

Brian, I have Access 97 and I cant see an On Exit event in
the events list for a form - any ideas?
-----Original Message-----
Best way is to specifically tell Access what field you
want to set the focus on and set this command in the On
Exit event of the subform. Use the syntax Forms!
[FormName].[FieldName].setfocus (the autohelp will correct
if I've mistyped anything).

Hope this helps.
-----Original Message-----
I have a form entering membership details. I have a
subform for entering additional names of family members.
When I click on the arrow for the next record the focus
remains where it was in the subform. Does anyone know how
to make the focus go back to the first field in the main
form. Many thanks for any help
.
.
 
Z

Zippy

Brian, Thanks very much - I have got your code to work -
it just needs to be applied to the OnExit event of the
last textbox on the subform, not the form itself which is
why I couldnt find it at first!
-----Original Message-----
Best way is to specifically tell Access what field you
want to set the focus on and set this command in the On
Exit event of the subform. Use the syntax Forms!
[FormName].[FieldName].setfocus (the autohelp will correct
if I've mistyped anything).

Hope this helps.
-----Original Message-----
I have a form entering membership details. I have a
subform for entering additional names of family members.
When I click on the arrow for the next record the focus
remains where it was in the subform. Does anyone know how
to make the focus go back to the first field in the main
form. Many thanks for any help
.
.
 

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