Access Violation when accessing properties of Form2 lazarus / 8-Other ---------------------------------------------------------------------- clauslack · 2009-05-22 13:25 Access Violation when accessing properties of Form2. Steps - Add a button to Form1 - Add a new Form Form2 - In project options-> Form->, move Form2 as forms available. - Add a button to Form2 - In TForm2.Button1Click put button1.caption:=form2.caption; - In implementation of Form1 add uses unit2.pas - In TForm1.Button1Click put procedure TForm1.Button1Click (Sender: TObject); var form: TForm2; begin    Form: = TFORM2.Create (Self);    Form.ShowModal; end; Run Open Form2 In TForm2.Button1Click show Access  Violation. ??? Any idea Tested in Lazarus 0.9.26.3 fpc 2.2.4 (23/04/2009) in Win2000 sp4 and Windows XP sp3 Thanks ---------------------------------------------------------------------- Paul Ishenin · 2009-05-22 13:46 QuoteIn TForm2.Button1Click put button1.caption:=form2.caption;yes, you are accesing not assigned variable. Where your Form2 variable is set? Nowhere. Solution: Remove Form2 variable at all. Replace your code with button1.Caption := Caption; ---------------------------------------------------------------------- clauslack · 2009-05-22 13:59 Works fine thank you very much!!!