problem pass values in form to subform to subform

I

Ina

Hello,


I have a form (FRM_MAIN) which contains different SubForms
(FRM_QUESTIONNER) and these subforms contain others subforms. (as
FRMSUB1, FRMSUB2, FRMSUB3 ... How can I pass along values to the
subforms?


I have a Main sub that englobes all subforms.

FRM_MAIN (record source select * from Survey) inside this sub I have:

FRM_SELECT (a list from which I choose a person --> here a have a
error record source select * from candidate) and FRM_QUESTION (Where i
have all question)

in FRM_QUESTION (record source select * from Survey) I Have FRMSUB1,
FRMSUB2, ... (question by category)

I would like to create a survey, and the answers for each survey is
handed over along the form.

table Survey (S_ID, person_Id, date, A1, A2, A3 ... An)

Any suggestions would be greatly appreciated.

Thanks.

Ina
 
G

Guest

Hi Ina,

I'm not sure I fully understand what you are trying to do. However let's
try to point you in the right direction.

If you are trying to synchronise your subforms then Access does this for you
via the Link Child Fields and Link Master Fields properties. (Second tab of
the Propeties dialog on form design view.)

Two more situations exist: one is where you want to 'push' data from the
master form to the sub form and the other is where you want to 'pull' data
from the master form to the sub form. I suppose you could even want to pass
data between sub forms.

You also need to decide what event triggers this data transfer.

Let me now try to relate my understanding of your situation. Your main form
contains two sub forms: one is a list of people/candidates and the other a
list of questions. You go on to imply the second sub form (FRM_QUESTION)
contains further sub forms. This cannot be so if FRM_QUESTION is a
continuous form since continuous forms cannot contain sub forms. So either
the additional sub forms are outside FRM_QUESTION or FRM_QUESTION is not
continuous and shows only one question at a time. Nothing wrong with that
except you have to step through all the questions to find the one you want.

I'm also uncertain what the main form does apart from acting as a container
for the sub forms unless you have more than one survey and this is where you
step through the surveys.

If it's not too late to change your design then I recommend that your
candidate list is implemented as a combo or list box. You could synchronise a
sub form to this list if you want to see further details about the selected
candidate. Likewise your question list should be a combo or list box. Now
you can synchronise all your other sub forms to the selected candidate and
question values - or let Access synchronise them for you.

In my design I have a main form containing two list boxes and a number of
sub forms, a two-level design. Access will perform all the synchronisation.
I cannot conceive of what data you may wish to pass between the forms but if
you do then 'all is possible.'

Regards,

Rod
 

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