Pass value to 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
 
N

NickHK

A form is basically a Class module with some predefined methods/events etc.
As such you can add your own properties and methods as you would a normal
Class module, shown here as a Public variable for brevity.

<FRM_SELECT code>
Public PersonName As String

Public Function DoSomething (Msg as string) as long
msgbox Msg
end function
</FRM_SELECT code>

<FRM_MAIN code>
with FRM_SELECT
.PersonName="Your Result"
.DoSomething .PersonName
end with
</FRM_MAIN code>

NickHK
 

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