You put the message box in the wrong place.
if (tb != null)
{
if(!string.IsNullOrEmpty(tb.Text))
{
Form2 form2 = new Form2();
form2.Show();
}
else
{
//error message goes here...
}
}