private void button3_Click(object sender, EventArgs e) { UseExistingCustomerIDForm form = new UseExistingCustomerIDForm(); form.ShowDialog(this); string s = UseExistingCustomerIDForm.GetCustomerID(); if (s != string.Empty) { tbRandomNumber.Text = s; } }