You need to pass Username and Password from 1Form to 2Form
Ex. In Form 1
Create object of 2Form and pass UserName and Password
Form2 f = new Form(Username,Password);
f.show();
In Form 2 create Constructor that have two parameter ie Username and Password
string UserName="";
string Password="";
Public Form2(string UserName, string Password)
{
this.UseName = UserName;
this.Password = Password;
InitializeComponent();
}
Also, In Form2 Load Event Run Following Query BUT MUST HAVE ONE UNIQUE CLOUMN IN BOTH TABLE
SELECT T1.USERNAME,T1.PASSWORD ,T2.NAME, T2.PHONE FROM TABLE1 T1 INNERJOIN TABLE2 T2 ON T1.ID = T2.ID WHERE T1.USERNAME="" AND T1.PASSWORD="";
Update above Query as per u r requirement
I hope this will be help for u
EDIT: code formatting added.