tcOfficeID is the PARAMETER you're passing in to the form. Forms accept PARAMETERs in the INIT method. You simply need to call your form with "DO FORM WITH ".
tcOfficeID will be available as a memvar during the processing of the INIT method, but remember: unless you then store that PARAMETER to a property on the form, tcOfficeID will disappear when INIT finishes processing.
Scott
>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
Scott D. Grabo Chief Information Officer Occupational Health Group First Advantage Corporation