how can i access to form2 componenets on form1

how can i access to form2 componenets on form1?
i have a paradox table .
table1 component is on form1 but i want to change the it's properties on form2!
how can i access to table1 Component?
shahabedeenAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
BorlandManConnect With a Mentor Commented:

include the unit in your uses clause.

you can open form2 in the development environment and then (shortcut) click File menu and select 'Use units', it should display the form1 unit, pick it and your good to go.

Only potential problem is that if form1 is invoking form2

ex:

TForm1.DisplayForm2BtnClick (Sender: TObject);
begin
  form2.ShowModal;  // assuming you are
                    // autocreateing this form.

end;

and then in form2

your doing something like this

TForm2.FormCreate(Sender:TObject);
begin
  form1.Table1.First;
end;

if you are doing something like this, you may find yourself receiving an error from the compiler saying something about "circular references", if so, then move the 'uses form1' from the initialization section to the implementation section of form2's unit. and that should fix it.

hope that helps,
sincerely,
J
0
 
shahabedeenAuthor Commented:
Thnaks!
0
 
TAZICommented:
Hi ..

Include in the uses clause ... Form2.

Example:)

implementation

uses Form2

procedure TForm1.Button1Click(Sender : TObject);
begin
  Form2.Table1.First; (As shown by BorlandMan above)
end;

Hope this information is useful

Thanks
Regards
TAZI
0
 
CleanupPingCommented:
shahabedeen:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
kacorretiredCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
       to accept BorlandMan's answer
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Some days and here is the Christmas Time. I wish good luck and good health for you all and for your loved ones

kacor
EE Cleanup Volunteer
0
All Courses

From novice to tech pro — start learning today.