private void btnSearch_Click(object sender, EventArgs e) { //if there is no order number entered in field... if (txtSearch.Text == "") { //print error message lblMessage.Text = "Please enter an existing Service Order number."; } //otherwise else { //create instance of the form frmSearchResults Results = new frmSearchResults(); //display the form Results.Show(); } }