Jason,
If I've not gotton your situation wrong :-
If the second form (Ofiice_Assignments) is a Private DS (DataSession=2), the tables from the first form (Orders) will not be available to it. You have to reopen them in the Form.Load() event as:-
USE Offices IN 0 SHARED
:
:
* Office_Assignments.Init() :-
lPARAMETERS tcOfficeID
=SEEK(tcOfficeID,"offices","nofficeid")
nOfficeID is the name of the Index, and does not necessarily refer to the field nOfficeID in Offices.DBF.
Kenneth.
>Hi everyone -
>
>I am attempting to pass a parameter to a child form, but havne't typed in the correct code to make it happen.
>
>I have a form called "orders", which has a command button called called ASSIGN CONTACT on it. When I click on that, up pops my "office_assignments" form.
>
>But, the office_id of the "offices" form isn't placed into the office_id textbox of the "office_assignments" form.
>
>**Note: the two tables are joined one to many by a field called>>
>nofficeid
>
>
>A developer on UT earlier today gave me some good instruction on how to accomplish this, but I have been unsuccessful. He said to create a private data session for my "office_assignments" form, and in the init event, place:
>
>lparameters tcOfficeId
>=seek(tcOfficeId,"mytable","myOfficeIdTag")
>
>I took that to mean the following:
>
>lparameters tcOfficeId
>=seek(tcOfficeId,"offices","nofficeid")
>
>but that didn't work.
>
>
>I don't see where I am defining tcOfficeId (b/c that doesn't exist), and setting that equal to something. Am I missing a line of code for my init event?
>
>Should it read>
>
>lparameters tcOfficeId
>tcOfficeId = offices.norderid && or office_assignments.norderid
>=seek(tcOfficeId,"offices","offices.norderid")
>
>
>If anyone sees my "ugly" mistake and can direct me further towards the finish line, I would appreciate very much!
>
>TIA
>
>Jason
Kenneth.