General information
Category:
Forms & Form designer
Hi Soykan,
you can pass object form1 to form2 to do what you want:
create a property on form2, call it "loform"
in the form2.init method put
lparameter loobj
thisform.loform=loobj
now, change your code from
DO FORM form\form2
to
DO FORM form\form2 with thisform
when you run this statement you are passing object form1 to form2 and store it in form2.loform property.
You can access all objects contained in form1 by using a sintax like:
thisform.loform.the_object_in_form1_you_need_to_access
at this point your form2.commandbutton click's method should be:
thisform.loform.grid.recordsource=thisform.grid.recordsource
HTH
franco
>Hi All,
>i have two form named form1 and form2 . i have a command button on the form1 named "browse" and code of this button like under
>
>* form1 browse button click code
>PARAMETERS param1,modeladi,LcDosya,LcFile
> cFileName = GETFILE("DBF","Select FileName...")
> IF ! EMPTY(cfilename)
>SELECT * from (cfilename) INTO CURSOR CrsResult
>DO FORM form\form2
> ENDIF
>
>and i am displaying on the Form2 selected (cfilename) dbf data's ( form2.grid.recordsource is CrsResult )
>
>Now... i wantto put a command button to the form2 with caption "retrieve this recordsource to the form1 grid recordsource "
>
>what should i do for this step by step ? how should be of this button click code ?
>
>TIA
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only