How do I tab from subform to subform?

G

Guest

I am building a form which has 7 subforms on it. In order to simplify
navigation from one subform to the next, I would like the user to be able to
use the Tab key. Through reading previous posts, I have inserted the
following code:

Forms![Staff]![Staff Red Cross Certifications
subform].Form![RCCertification].SetFocus

The code is in the OnExit event of the last control of the preceeding
subform. The main form is "Staff", the subform and control of the preceeding
subform are "HR Cerfications subform" and "HR Certification ID",
respectively. The subform and control destination are "Staff Red Cross
Certifications subform" and "RCCertification", respectively.

Unfortunately, I received a run-time error 2465.

Please help.
 
G

Guest

The error says it can't find the field referred to; however, in this context,
I believe it means the control on the subform, but that still may not be the
problem. Just looking at your code, I don't see a problem. Just for
experimental purposes, try this variantion:

Me.Pareent![Staff Red Cross Certifications
subform].Form![RCCertification].SetFocus
 
G

Guest

is the control name plural? Certification vs Certifications

one letter wrong and it can't find the control.....
 
G

Guest

Klatuu,

I entered the code you suggest and now I get a run-time error 2455. I have
also checked and rechecked the names of the subforms and controls.

Any ideas?

Roy

Klatuu said:
The error says it can't find the field referred to; however, in this context,
I believe it means the control on the subform, but that still may not be the
problem. Just looking at your code, I don't see a problem. Just for
experimental purposes, try this variantion:

Me.Pareent![Staff Red Cross Certifications
subform].Form![RCCertification].SetFocus


Roy said:
I am building a form which has 7 subforms on it. In order to simplify
navigation from one subform to the next, I would like the user to be able to
use the Tab key. Through reading previous posts, I have inserted the
following code:

Forms![Staff]![Staff Red Cross Certifications
subform].Form![RCCertification].SetFocus

The code is in the OnExit event of the last control of the preceeding
subform. The main form is "Staff", the subform and control of the preceeding
subform are "HR Cerfications subform" and "HR Certification ID",
respectively. The subform and control destination are "Staff Red Cross
Certifications subform" and "RCCertification", respectively.

Unfortunately, I received a run-time error 2465.

Please 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