Changing focus tfrom subform to main form on update

  • Thread starter Thread starter Zippy
  • Start date Start date
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
 
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.
 
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
.
.
 
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
.
.
 
Back
Top