you could add code to the Exit event procedure of the last control (in the
tab order) of the subform to SetFocus back to a control in the main form, as
Me.Parent!MainFormControlName.SetFocus
replace MainFormControlName with the correct name of the control on the main
form that you want the cursor to "land" in.
but, if you do this, the user won't be able to easily add multiple records
to the subform at one time, because the code will keep kicking the focus out
of the subform into the main form. as an alternative, you might want to set
a hot key to the main form control the user will want to move to - by
"underlining" a letter in the control label's caption. you do this by adding
an ampersand (&) immediately before the letter in the Caption property. for
example, the following caption property in a control's label, as
&First Name
will underline the F in Form view, and the user can jump to that control by
pressing Shift+f.
having set up a hot key, you'd need to train your users to use it to get
back to the main form. to an experienced data entry operator, this method
quickly becomes second nature, and is much quicker than using the mouse to
click into the desired field.
hth
Ron said:
I have just made some cosmetic changes to my subform. To get the effects of
the change, I had to change my views from Database to Continuous Forms. My
problem is: When I am done entering Equipment in the subform, I can't tab out
of it to go on to an item on the main form like I could before in Database
view. I'm sure there is some code I can put in that last field of the
subform, or somewhere, but I can't seem to make anything work. I am new to
this. Thanks for any help.
In the last field on the subform, you may want to write a code on the
exist property of this field something like the below.
Me![mainfom]![thefield you want to go to].setfocus
THat should point you to the field you want when the last field on the
subform exist.
GL.