ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pass value to form to subform to subform (https://www.excelbanter.com/excel-programming/382204-pass-value-form-subform-subform.html)

ina

Pass value to form to subform to subform
 
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


NickHK

Pass value to form to subform to subform
 
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

"ina" wrote in message
oups.com...
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




ina

Pass value to form to subform to subform
 

Hello Nick

thanks for this information.

I will follow this track; thanks a lot

Ina

On Jan 30, 10:41 am, "NickHK" wrote:
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

"ina" wrote in ooglegroups.com...



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- Hide quoted text -- Show quoted text -




All times are GMT +1. The time now is 06:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com