Order in which required fields are entered into a form

S

Seth

Hi,

I have created a form with 3 subforms. This form is split in to 3 parts on a
3-page tab control.

I want the user to enter data in the order below. All fields are required.
My problem is that Access97 wants all fields of the main form to be completed
in the order set by the table. I have tried setting the form tab order
property but it is being overridden.

First page:
a) Complete first 6 fields of main form
b) Complete subform 1
c) Complete subform 2
Second page:
d) Complete 5th field of main form
e) Complete subform 3
f) Complete 6th field of main form
Third page
g) Complete three fields of main form

Any help appreciated,
Seth
 
S

Steve Schapel

Seth,

I have never experienced the Tab Order settings for a form being
overridden. But the settings apply to the controls within each form
separately. You are jumping back and forth between the main form and
the subforms. I think you will need to use code to control the
navigation around your form. I am a bit confused by your description...
it looks like the 5th and 6th "fields" on the main form get entered
twice? But anyway, for example, it looks like you could put something
like this on the Exit event of the last control on subfrom 2:
Me.Parent![NameOf_5thMainControl].SetFocus
Similar code could be used to direct the cursor in cases where the Tab
Order is not applicable.
 
S

Steve Schapel

Seth,
Do I have to fill in all required fields on the main form before I fill in
the subforms?

Yes. As soon as you move the focus from the main form, Access needs to
save the record, so if you have fields whose Required property is set to
Yes, then they have to have data in them.
 
S

Seth

Thanks Steve. Everything makes sence now.
Seth

Steve Schapel said:
Seth,


Yes. As soon as you move the focus from the main form, Access needs to
save the record, so if you have fields whose Required property is set to
Yes, then they have to have data in them.
 
K

Kari

There is a great table by Keri Hardwick to show how to reference forms,
subforms, and sub-subforms from various locations (including subform to main
form). I keep a copy on my computer as I use it often.

It can be found at : http://www.mvps.org/access/forms/frm0031.htm

Seth said:
Thanks alot Steve.
I can see how it is possible to do it with setfocus. I have now used
setfocus to successfully jump between controls on the main form but am having
trouble with the syntax for jumping from the main form to a subform. I have
never used VB code before so I might be missing something quite basic. Here
is my attempt:

Me!sfrmTestReportStds.SetFocus

Me.Parent! will get me from a subform to the main form but I am trying to go
from the main form to a subform.

Regards,
Seth

In my frist email '5th' and '6th' should read '7th' and '8th'

Steve Schapel said:
Seth,

I have never experienced the Tab Order settings for a form being
overridden. But the settings apply to the controls within each form
separately. You are jumping back and forth between the main form and
the subforms. I think you will need to use code to control the
navigation around your form. I am a bit confused by your description...
it looks like the 5th and 6th "fields" on the main form get entered
twice? But anyway, for example, it looks like you could put something
like this on the Exit event of the last control on subfrom 2:
Me.Parent![NameOf_5thMainControl].SetFocus
Similar code could be used to direct the cursor in cases where the Tab
Order is not applicable.

--
Steve Schapel, Microsoft Access MVP

Hi,

I have created a form with 3 subforms. This form is split in to 3 parts on a
3-page tab control.

I want the user to enter data in the order below. All fields are required.
My problem is that Access97 wants all fields of the main form to be completed
in the order set by the table. I have tried setting the form tab order
property but it is being overridden.

First page:
a) Complete first 6 fields of main form
b) Complete subform 1
c) Complete subform 2
Second page:
d) Complete 5th field of main form
e) Complete subform 3
f) Complete 6th field of main form
Third page
g) Complete three fields of main form

Any help appreciated,
Seth
 
Top