Moving focus/control on sub forms

canjfn

Registered User.
Local time
Today, 20:50
Joined
Apr 24, 2001
Messages
28
I have a parent form called "frm_job_enter"

and two sub-forms called "frm_fabricator" & "frm_engineer"

On the sub form "frm_fabricator" I have a combo box and after updating this combo box (called fabricator) I would like the cursor to jump into a field called “ApllicationsEng” on the other sub form "frm_engineer"

Any help would be appreciated thank you.
 
On the combo box fabricator AfterUpdate event run the following code:

forms!frm_job_enter!frm_engineer.form.ApllicationsEng.setfocus

Note: In the future, instead of using "_" (a character which adds nothing to a neumonic name), capitalize the character which follows. Think how many key strokes that will save, plus, code clarity will probabily be just as good.
 
Thanks for the response but that doesn't do it.

I have attached the example,

On the enter New Job form, note the purple sub form, after using the combo "Fabricator" after update would like the cursor to jump into Application ENG on the green sub-form
 

Attachments

'first, set focus to main form
forms!frm_job_enter.form.setfocus
'second, set focus to subform
forms!frm_job_enter!form_engineer.form.setfocus
'finally, setfocus to control on subform
forms!frm_job_enter!frm_engineer.form.ApllicationsEng.setfocus

I trust that you piucked up on my control spelling error on my first posting in this thread.

Without figuring out what data was needed, I couldn't easily get focus to the fabricator combo box. That's another problem entirely.
 

Users who are viewing this thread

Back
Top Bottom