Reading data from nested forms in Access 2000

G

Guest

I am having dificulty reading data from a nested subforn i.e mainform -
subform - subform.
I can read from the main form "Forms![customer].customernameI ". I can
read from the 1st subform "Forms![customer]![equipment
subform].Form!CustomerName". I can't read from the 2nd subform
"Forms![customer]![equipment subform].Form![work orders
subform].Form![Customername]" or any variation on the synyax that i can think
of. Can anyone help.

regards

Jhill165
 
G

Guest

If you mean that you have a main form with a subform where the subform holds
another subform then you can access the values in the lowest subform as
follows:
forms!mainform!sub2!sub3!field
with
mainform is the name of the mainform
sub2 is the name of the control holding the first subform (control belongs
to the mainform controls)
sub3 is the name of the control holding the second subform (control belongs
to the subform2 controls)
field is the name of the requested field.

If this isn't the solution, I'll be back.

Dries
 
G

Guest

Dries

Thank you for your help. Unfortunatley it didn't work i still get the error
message "... can't find the field ' sub3' referred to in our expression."
I am using the name of the subform (as listed in the properties) for sub3.

Further help would be appreciated

Dries Van Poucke said:
If you mean that you have a main form with a subform where the subform holds
another subform then you can access the values in the lowest subform as
follows:
forms!mainform!sub2!sub3!field
with
mainform is the name of the mainform
sub2 is the name of the control holding the first subform (control belongs
to the mainform controls)
sub3 is the name of the control holding the second subform (control belongs
to the subform2 controls)
field is the name of the requested field.

If this isn't the solution, I'll be back.

Dries

jhill165 said:
I am having dificulty reading data from a nested subforn i.e mainform -
subform - subform.
I can read from the main form "Forms![customer].customernameI ". I can
read from the 1st subform "Forms![customer]![equipment
subform].Form!CustomerName". I can't read from the 2nd subform
"Forms![customer]![equipment subform].Form![work orders
subform].Form![Customername]" or any variation on the synyax that i can think
of. Can anyone help.

regards

Jhill165
 

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