Question The value is not in the textbox of a form when a form is opened

Lin100

Well-known member
Joined
Dec 12, 2022
Messages
69
Programming Experience
10+
The code below ran without any error. When I double-click on the cell in the dataGridView2,
the form Reservation1 opened, but the three value below are not in the textbox. The three
text boxes are blank. The other two values are in the form Reservation1.

R1.Property_Name.Text = this.dataGridView2.CurrentRow.Cells[0].Value.ToString(); --> This value is in the form Reservation1
R1.Unit_Number.Text = this.dataGridView2.CurrentRow.Cells[1].Value.ToString(); --> This value is in the form Reservation1

R1.Date_Reserved.Text = Date_Reserved.ToString(); --> This value is not in the textbox of form Reservation1
R1.Lease_Months.Text = "6"; --> This value is not in the textbox of form Reservation1
R1.Reservation_Cancelled.Text = "No"; --> This value is not in the textbox of form Reservation1

The value is not in the textbox of a form when a form is opened:
private void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e)
   {
     string Apartment_Status;
     DateTime Date_Reserved = DateTime.Now.Date;
     MessageBox.Show("Date_Reserved =  " + Date_Reserved);

     object value = this.dataGridView2.CurrentRow.Cells[7].Value.ToString();
     if (value is DBNull) { return; }
       Apartment_Status = value.ToString();
       MessageBox.Show("Apartment_Status =  " + Apartment_Status);

     switch (Apartment_Status)
      {
          case "Reserved":
            Reservation1 R1 = new Reservation1();
            R1.Property_Name.Text = this.dataGridView2.CurrentRow.Cells[0].Value.ToString();  --> This value is in the form Reservation1
            R1.Unit_Number.Text = this.dataGridView2.CurrentRow.Cells[1].Value.ToString();    --> This value is in the form Reservation1
            R1.Date_Reserved.Text = Date_Reserved.ToString();     --> This value is not in the textbox of form Reservation1
            R1.Lease_Months.Text = "6";                           --> This value is not in the textbox of form Reservation1
            R1.Reservation_Cancelled.Text = "No";                 --> This value is not in the textbox of form Reservation1
            R1.Show();
          break;

          case "Occupied":
            Tenant T1 = new Tenant();
            T1.Property_Name.Text = this.dataGridView2.CurrentRow.Cells[0].Value.ToString();
            T1.Unit_Number.Text = this.dataGridView2.CurrentRow.Cells[1].Value.ToString();
            T1.Show();
          break;

          case "Vacant":
            Reservation1 R2 = new Reservation1();
            R2.Property_Name.Text = this.dataGridView2.CurrentRow.Cells[0].Value.ToString();
            R2.Unit_Number.Text = this.dataGridView2.CurrentRow.Cells[1].Value.ToString();
            R2.Show();
          break;

          default:
          break;
       }
   }
 
Yeah, but I didn't ask for those other files and you didn't provide the designer code file for that form. Each form has two code files: user and designer. The user file is where you write your code and the designer file is where the designer-generated code is placed. If you Ctrl+clicked the variable in your original code, as I said, then you'd have gone straight to that file if everything was set up correctly. If Ctrl+click doesn't work (some systems may be configured differently) then you should be able to right-click and go to the declaration.
Unit_2 Designer

Unit_2 Designer:
namespace Apartment_Management
{
    partial class Unit_2
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.amS_2007DataSet1 = new Apartment_Management.AMS_2007DataSet();
            this.dataGridView2 = new System.Windows.Forms.DataGridView();
            this.label_Property_Name = new System.Windows.Forms.Label();
            this.comboBox_Name_2 = new System.Windows.Forms.ComboBox();
            this.amS2007DataSet1BindingSource = new System.Windows.Forms.BindingSource(this.components);
            ((System.ComponentModel.ISupportInitialize)(this.amS_2007DataSet1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.amS2007DataSet1BindingSource)).BeginInit();
            this.SuspendLayout();
            //
            // amS_2007DataSet1
            //
            this.amS_2007DataSet1.DataSetName = "AMS_2007DataSet";
            this.amS_2007DataSet1.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
            //
            // dataGridView2
            //
            this.dataGridView2.AllowUserToOrderColumns = true;
            this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dataGridView2.Location = new System.Drawing.Point(12, 101);
            this.dataGridView2.Name = "dataGridView2";
            this.dataGridView2.RowHeadersWidth = 51;
            this.dataGridView2.RowTemplate.Height = 24;
            this.dataGridView2.Size = new System.Drawing.Size(983, 400);
            this.dataGridView2.TabIndex = 0;
            this.dataGridView2.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView2_CellContentClick);
            this.dataGridView2.CellContentDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView2_CellContentClick);
            this.dataGridView2.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView2_CellContentClick);
            this.dataGridView2.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.DataGridView2_CellFormatting);
            //
            // label_Property_Name
            //
            this.label_Property_Name.AutoSize = true;
            this.label_Property_Name.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label_Property_Name.Location = new System.Drawing.Point(392, 33);
            this.label_Property_Name.Name = "label_Property_Name";
            this.label_Property_Name.Size = new System.Drawing.Size(130, 22);
            this.label_Property_Name.TabIndex = 4;
            this.label_Property_Name.Text = "Property Name";
            //
            // comboBox_Name_2
            //
            this.comboBox_Name_2.FormattingEnabled = true;
            this.comboBox_Name_2.ImeMode = System.Windows.Forms.ImeMode.On;
            this.comboBox_Name_2.Location = new System.Drawing.Point(395, 58);
            this.comboBox_Name_2.Name = "comboBox_Name_2";
            this.comboBox_Name_2.Size = new System.Drawing.Size(208, 24);
            this.comboBox_Name_2.TabIndex = 5;
            this.comboBox_Name_2.SelectedIndexChanged += new System.EventHandler(this.comboBox_Name_2_SelectedIndexChanged);
            //
            // amS2007DataSet1BindingSource
            //
            this.amS2007DataSet1BindingSource.DataSource = this.amS_2007DataSet1;
            this.amS2007DataSet1BindingSource.Position = 0;
            //
            // Unit_2
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(1007, 513);
            this.Controls.Add(this.comboBox_Name_2);
            this.Controls.Add(this.label_Property_Name);
            this.Controls.Add(this.dataGridView2);
            this.Name = "Unit_2";
            this.Text = "Unit_2";
            this.Load += new System.EventHandler(this.Unit_2_Load);
            ((System.ComponentModel.ISupportInitialize)(this.amS_2007DataSet1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.amS2007DataSet1BindingSource)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private AMS_2007DataSet amS_2007DataSet1;
        private System.Windows.Forms.DataGridView dataGridView2;
        private System.Windows.Forms.Label label_Property_Name;
        private System.Windows.Forms.ComboBox comboBox_Name_2;
        private System.Windows.Forms.BindingSource amS2007DataSet1BindingSource;
    }
}
Reservation1 Designer:
namespace Apartment_Management
{
    partial class Reservation1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.Property_Name = new System.Windows.Forms.TextBox();
            this.Unit_Number = new System.Windows.Forms.TextBox();
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.Add_Record = new System.Windows.Forms.Button();
            this.label3 = new System.Windows.Forms.Label();
            this.Reservation_Number_Txt = new System.Windows.Forms.TextBox();
            this.label4 = new System.Windows.Forms.Label();
            this.Security_Deposit = new System.Windows.Forms.TextBox();
            this.label5 = new System.Windows.Forms.Label();
            this.Type_of_Payment = new System.Windows.Forms.TextBox();
            this.label6 = new System.Windows.Forms.Label();
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.label7 = new System.Windows.Forms.Label();
            this.Last_Name = new System.Windows.Forms.TextBox();
            this.label8 = new System.Windows.Forms.Label();
            this.First_Name = new System.Windows.Forms.TextBox();
            this.label9 = new System.Windows.Forms.Label();
            this.Middle_Name = new System.Windows.Forms.TextBox();
            this.label10 = new System.Windows.Forms.Label();
            this.textBox2 = new System.Windows.Forms.TextBox();
            this.label11 = new System.Windows.Forms.Label();
            this.City = new System.Windows.Forms.TextBox();
            this.label12 = new System.Windows.Forms.Label();
            this.State = new System.Windows.Forms.TextBox();
            this.label13 = new System.Windows.Forms.Label();
            this.Zip_Code = new System.Windows.Forms.TextBox();
            this.label14 = new System.Windows.Forms.Label();
            this.Driver_License = new System.Windows.Forms.TextBox();
            this.label15 = new System.Windows.Forms.Label();
            this.Social_Security = new System.Windows.Forms.TextBox();
            this.label16 = new System.Windows.Forms.Label();
            this.Home_Phone = new System.Windows.Forms.TextBox();
            this.label17 = new System.Windows.Forms.Label();
            this.Work_Phone = new System.Windows.Forms.TextBox();
            this.label18 = new System.Windows.Forms.Label();
            this.Credit_Card = new System.Windows.Forms.TextBox();
            this.label19 = new System.Windows.Forms.Label();
            this.Date_Moved_In_Planned = new System.Windows.Forms.TextBox();
            this.label20 = new System.Windows.Forms.Label();
            this.Date_Reserved = new System.Windows.Forms.TextBox();
            this.label21 = new System.Windows.Forms.Label();
            this.Reservation_Cancelled = new System.Windows.Forms.TextBox();
            this.label22 = new System.Windows.Forms.Label();
            this.Lease_Months = new System.Windows.Forms.TextBox();
            this.SuspendLayout();
            //
            // Property_Name
            //
            this.Property_Name.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Property_Name.Location = new System.Drawing.Point(206, 101);
            this.Property_Name.Multiline = true;
            this.Property_Name.Name = "Property_Name";
            this.Property_Name.Size = new System.Drawing.Size(269, 31);
            this.Property_Name.TabIndex = 1;
            //
            // Unit_Number
            //
            this.Unit_Number.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Unit_Number.Location = new System.Drawing.Point(473, 101);
            this.Unit_Number.Multiline = true;
            this.Unit_Number.Name = "Unit_Number";
            this.Unit_Number.Size = new System.Drawing.Size(158, 31);
            this.Unit_Number.TabIndex = 2;
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label1.Location = new System.Drawing.Point(205, 73);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(142, 25);
            this.label1.TabIndex = 2;
            this.label1.Text = "Property Name";
            //
            // label2
            //
            this.label2.AutoSize = true;
            this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label2.Location = new System.Drawing.Point(468, 72);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(120, 25);
            this.label2.TabIndex = 3;
            this.label2.Text = "Unit Number";
            //
            // Add_Record
            //
            this.Add_Record.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Add_Record.Location = new System.Drawing.Point(15, 481);
            this.Add_Record.Name = "Add_Record";
            this.Add_Record.Size = new System.Drawing.Size(147, 35);
            this.Add_Record.TabIndex = 23;
            this.Add_Record.Text = "Add Record";
            this.Add_Record.UseVisualStyleBackColor = true;
            this.Add_Record.Click += new System.EventHandler(this.Add_Record_Click);
            //
            // label3
            //
            this.label3.AutoSize = true;
            this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label3.Location = new System.Drawing.Point(11, 73);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(189, 25);
            this.label3.TabIndex = 6;
            this.label3.Text = "Reservation Number";
            //
            // Reservation_Number_Txt
            //
            this.Reservation_Number_Txt.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Reservation_Number_Txt.Location = new System.Drawing.Point(12, 101);
            this.Reservation_Number_Txt.Multiline = true;
            this.Reservation_Number_Txt.Name = "Reservation_Number_Txt";
            this.Reservation_Number_Txt.Size = new System.Drawing.Size(194, 31);
            this.Reservation_Number_Txt.TabIndex = 0;
            //
            // label4
            //
            this.label4.AutoSize = true;
            this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label4.Location = new System.Drawing.Point(626, 72);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(154, 25);
            this.label4.TabIndex = 8;
            this.label4.Text = "Security Deposit";
            //
            // Security_Deposit
            //
            this.Security_Deposit.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Security_Deposit.Location = new System.Drawing.Point(631, 101);
            this.Security_Deposit.Multiline = true;
            this.Security_Deposit.Name = "Security_Deposit";
            this.Security_Deposit.Size = new System.Drawing.Size(158, 31);
            this.Security_Deposit.TabIndex = 3;
            //
            // label5
            //
            this.label5.AutoSize = true;
            this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label5.Location = new System.Drawing.Point(779, 72);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(139, 25);
            this.label5.TabIndex = 10;
            this.label5.Text = "Payment Type";
            //
            // Type_of_Payment
            //
            this.Type_of_Payment.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Type_of_Payment.Location = new System.Drawing.Point(784, 101);
            this.Type_of_Payment.Multiline = true;
            this.Type_of_Payment.Name = "Type_of_Payment";
            this.Type_of_Payment.Size = new System.Drawing.Size(149, 31);
            this.Type_of_Payment.TabIndex = 4;
            //
            // label6
            //
            this.label6.AutoSize = true;
            this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label6.Location = new System.Drawing.Point(10, 142);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(177, 25);
            this.label6.TabIndex = 12;
            this.label6.Text = "Instrument Number";
            //
            // textBox1
            //
            this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.textBox1.Location = new System.Drawing.Point(15, 171);
            this.textBox1.Multiline = true;
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(191, 31);
            this.textBox1.TabIndex = 5;
            //
            // label7
            //
            this.label7.AutoSize = true;
            this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label7.Location = new System.Drawing.Point(201, 142);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(106, 25);
            this.label7.TabIndex = 14;
            this.label7.Text = "Last Name";
            //
            // Last_Name
            //
            this.Last_Name.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Last_Name.Location = new System.Drawing.Point(206, 171);
            this.Last_Name.Multiline = true;
            this.Last_Name.Name = "Last_Name";
            this.Last_Name.Size = new System.Drawing.Size(179, 31);
            this.Last_Name.TabIndex = 6;
            //
            // label8
            //
            this.label8.AutoSize = true;
            this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label8.Location = new System.Drawing.Point(380, 142);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(106, 25);
            this.label8.TabIndex = 16;
            this.label8.Text = "First Name";
            //
            // First_Name
            //
            this.First_Name.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.First_Name.Location = new System.Drawing.Point(385, 171);
            this.First_Name.Multiline = true;
            this.First_Name.Name = "First_Name";
            this.First_Name.Size = new System.Drawing.Size(179, 31);
            this.First_Name.TabIndex = 7;
            //
            // label9
            //
            this.label9.AutoSize = true;
            this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label9.Location = new System.Drawing.Point(559, 142);
            this.label9.Name = "label9";
            this.label9.Size = new System.Drawing.Size(70, 25);
            this.label9.TabIndex = 18;
            this.label9.Text = "Middle";
            //
            // Middle_Name
            //
            this.Middle_Name.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Middle_Name.Location = new System.Drawing.Point(564, 171);
            this.Middle_Name.Multiline = true;
            this.Middle_Name.Name = "Middle_Name";
            this.Middle_Name.Size = new System.Drawing.Size(122, 31);
            this.Middle_Name.TabIndex = 8;
            //
            // label10
            //
            this.label10.AutoSize = true;
            this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label10.Location = new System.Drawing.Point(681, 142);
            this.label10.Name = "label10";
            this.label10.Size = new System.Drawing.Size(185, 25);
            this.label10.TabIndex = 20;
            this.label10.Text = "Permanent Address";
            //
            // textBox2
            //
            this.textBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.textBox2.Location = new System.Drawing.Point(686, 171);
            this.textBox2.Multiline = true;
            this.textBox2.Name = "textBox2";
            this.textBox2.Size = new System.Drawing.Size(247, 31);
            this.textBox2.TabIndex = 9;
            //
            // label11
            //
            this.label11.AutoSize = true;
            this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label11.Location = new System.Drawing.Point(11, 216);
            this.label11.Name = "label11";
            this.label11.Size = new System.Drawing.Size(46, 25);
            this.label11.TabIndex = 22;
            this.label11.Text = "City";
            //
            // City
            //
            this.City.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.City.Location = new System.Drawing.Point(16, 245);
            this.City.Multiline = true;
            this.City.Name = "City";
            this.City.Size = new System.Drawing.Size(190, 31);
            this.City.TabIndex = 10;
            //
            // label12
            //
            this.label12.AutoSize = true;
            this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label12.Location = new System.Drawing.Point(201, 216);
            this.label12.Name = "label12";
            this.label12.Size = new System.Drawing.Size(58, 25);
            this.label12.TabIndex = 24;
            this.label12.Text = "State";
            //
            // State
            //
            this.State.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.State.Location = new System.Drawing.Point(206, 245);
            this.State.Multiline = true;
            this.State.Name = "State";
            this.State.Size = new System.Drawing.Size(179, 31);
            this.State.TabIndex = 11;
            //
            // label13
            //
            this.label13.AutoSize = true;
            this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label13.Location = new System.Drawing.Point(380, 216);
            this.label13.Name = "label13";
            this.label13.Size = new System.Drawing.Size(92, 25);
            this.label13.TabIndex = 26;
            this.label13.Text = "Zip Code";
            //
            // Zip_Code
            //
            this.Zip_Code.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Zip_Code.Location = new System.Drawing.Point(385, 245);
            this.Zip_Code.Multiline = true;
            this.Zip_Code.Name = "Zip_Code";
            this.Zip_Code.Size = new System.Drawing.Size(179, 31);
            this.Zip_Code.TabIndex = 12;
            //
            // label14
            //
            this.label14.AutoSize = true;
            this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label14.Location = new System.Drawing.Point(559, 216);
            this.label14.Name = "label14";
            this.label14.Size = new System.Drawing.Size(136, 25);
            this.label14.TabIndex = 28;
            this.label14.Text = "Driver License";
            //
            // Driver_License
            //
            this.Driver_License.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Driver_License.Location = new System.Drawing.Point(564, 245);
            this.Driver_License.Multiline = true;
            this.Driver_License.Name = "Driver_License";
            this.Driver_License.Size = new System.Drawing.Size(179, 31);
            this.Driver_License.TabIndex = 14;
            //
            // label15
            //
            this.label15.AutoSize = true;
            this.label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label15.Location = new System.Drawing.Point(734, 216);
            this.label15.Name = "label15";
            this.label15.Size = new System.Drawing.Size(142, 25);
            this.label15.TabIndex = 30;
            this.label15.Text = "Social Security";
            //
            // Social_Security
            //
            this.Social_Security.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Social_Security.Location = new System.Drawing.Point(739, 245);
            this.Social_Security.Multiline = true;
            this.Social_Security.Name = "Social_Security";
            this.Social_Security.Size = new System.Drawing.Size(194, 31);
            this.Social_Security.TabIndex = 15;
            //
            // label16
            //
            this.label16.AutoSize = true;
            this.label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label16.Location = new System.Drawing.Point(341, 291);
            this.label16.Name = "label16";
            this.label16.Size = new System.Drawing.Size(126, 25);
            this.label16.TabIndex = 36;
            this.label16.Text = "Home Phone";
            //
            // Home_Phone
            //
            this.Home_Phone.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Home_Phone.Location = new System.Drawing.Point(346, 320);
            this.Home_Phone.Multiline = true;
            this.Home_Phone.Name = "Home_Phone";
            this.Home_Phone.Size = new System.Drawing.Size(152, 31);
            this.Home_Phone.TabIndex = 18;
            //
            // label17
            //
            this.label17.AutoSize = true;
            this.label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label17.Location = new System.Drawing.Point(190, 291);
            this.label17.Name = "label17";
            this.label17.Size = new System.Drawing.Size(121, 25);
            this.label17.TabIndex = 34;
            this.label17.Text = "Work Phone";
            //
            // Work_Phone
            //
            this.Work_Phone.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Work_Phone.Location = new System.Drawing.Point(195, 320);
            this.Work_Phone.Multiline = true;
            this.Work_Phone.Name = "Work_Phone";
            this.Work_Phone.Size = new System.Drawing.Size(152, 31);
            this.Work_Phone.TabIndex = 17;
            //
            // label18
            //
            this.label18.AutoSize = true;
            this.label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label18.Location = new System.Drawing.Point(11, 291);
            this.label18.Name = "label18";
            this.label18.Size = new System.Drawing.Size(112, 25);
            this.label18.TabIndex = 32;
            this.label18.Text = "Credit Card";
            //
            // Credit_Card
            //
            this.Credit_Card.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Credit_Card.Location = new System.Drawing.Point(16, 320);
            this.Credit_Card.Multiline = true;
            this.Credit_Card.Name = "Credit_Card";
            this.Credit_Card.Size = new System.Drawing.Size(179, 31);
            this.Credit_Card.TabIndex = 16;
            //
            // label19
            //
            this.label19.AutoSize = true;
            this.label19.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label19.Location = new System.Drawing.Point(642, 291);
            this.label19.Name = "label19";
            this.label19.Size = new System.Drawing.Size(216, 25);
            this.label19.TabIndex = 40;
            this.label19.Text = "Date Moved In Planned";
            //
            // Date_Moved_In_Planned
            //
            this.Date_Moved_In_Planned.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Date_Moved_In_Planned.Location = new System.Drawing.Point(647, 320);
            this.Date_Moved_In_Planned.Multiline = true;
            this.Date_Moved_In_Planned.Name = "Date_Moved_In_Planned";
            this.Date_Moved_In_Planned.Size = new System.Drawing.Size(286, 31);
            this.Date_Moved_In_Planned.TabIndex = 20;
            //
            // label20
            //
            this.label20.AutoSize = true;
            this.label20.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label20.Location = new System.Drawing.Point(491, 291);
            this.label20.Name = "label20";
            this.label20.Size = new System.Drawing.Size(141, 25);
            this.label20.TabIndex = 38;
            this.label20.Text = "Date Reserved";
            //
            // Date_Reserved
            //
            this.Date_Reserved.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Date_Reserved.Location = new System.Drawing.Point(496, 320);
            this.Date_Reserved.Multiline = true;
            this.Date_Reserved.Name = "Date_Reserved";
            this.Date_Reserved.Size = new System.Drawing.Size(152, 31);
            this.Date_Reserved.TabIndex = 19;
            this.Date_Reserved.TextChanged += new System.EventHandler(this.Reservation1_Load);
            //
            // label21
            //
            this.label21.AutoSize = true;
            this.label21.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label21.Location = new System.Drawing.Point(162, 370);
            this.label21.Name = "label21";
            this.label21.Size = new System.Drawing.Size(224, 25);
            this.label21.TabIndex = 44;
            this.label21.Text = "Reservation Cancelled ?";
            //
            // Reservation_Cancelled
            //
            this.Reservation_Cancelled.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Reservation_Cancelled.Location = new System.Drawing.Point(167, 399);
            this.Reservation_Cancelled.Multiline = true;
            this.Reservation_Cancelled.Name = "Reservation_Cancelled";
            this.Reservation_Cancelled.Size = new System.Drawing.Size(219, 31);
            this.Reservation_Cancelled.TabIndex = 22;
            //
            // label22
            //
            this.label22.AutoSize = true;
            this.label22.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label22.Location = new System.Drawing.Point(11, 370);
            this.label22.Name = "label22";
            this.label22.Size = new System.Drawing.Size(136, 25);
            this.label22.TabIndex = 42;
            this.label22.Text = "Lease Months";
            //
            // Lease_Months
            //
            this.Lease_Months.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Lease_Months.Location = new System.Drawing.Point(16, 399);
            this.Lease_Months.Multiline = true;
            this.Lease_Months.Name = "Lease_Months";
            this.Lease_Months.Size = new System.Drawing.Size(152, 31);
            this.Lease_Months.TabIndex = 21;
            this.Lease_Months.TextChanged += new System.EventHandler(this.Lease_Months_TextChanged);
            //
            // Reservation1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(1041, 668);
            this.Controls.Add(this.label21);
            this.Controls.Add(this.Reservation_Cancelled);
            this.Controls.Add(this.label22);
            this.Controls.Add(this.Lease_Months);
            this.Controls.Add(this.label19);
            this.Controls.Add(this.Date_Moved_In_Planned);
            this.Controls.Add(this.label20);
            this.Controls.Add(this.Date_Reserved);
            this.Controls.Add(this.label16);
            this.Controls.Add(this.Home_Phone);
            this.Controls.Add(this.label17);
            this.Controls.Add(this.Work_Phone);
            this.Controls.Add(this.label18);
            this.Controls.Add(this.Credit_Card);
            this.Controls.Add(this.label15);
            this.Controls.Add(this.Social_Security);
            this.Controls.Add(this.label14);
            this.Controls.Add(this.Driver_License);
            this.Controls.Add(this.label13);
            this.Controls.Add(this.Zip_Code);
            this.Controls.Add(this.label12);
            this.Controls.Add(this.State);
            this.Controls.Add(this.label11);
            this.Controls.Add(this.City);
            this.Controls.Add(this.label10);
            this.Controls.Add(this.textBox2);
            this.Controls.Add(this.label9);
            this.Controls.Add(this.Middle_Name);
            this.Controls.Add(this.label8);
            this.Controls.Add(this.First_Name);
            this.Controls.Add(this.label7);
            this.Controls.Add(this.Last_Name);
            this.Controls.Add(this.label6);
            this.Controls.Add(this.textBox1);
            this.Controls.Add(this.label5);
            this.Controls.Add(this.Type_of_Payment);
            this.Controls.Add(this.label4);
            this.Controls.Add(this.Security_Deposit);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.Reservation_Number_Txt);
            this.Controls.Add(this.Add_Record);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.Unit_Number);
            this.Controls.Add(this.Property_Name);
            this.Name = "Reservation1";
            this.Text = "Reservation1";
            this.Load += new System.EventHandler(this.Reservation1_Load);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label label2;
        public System.Windows.Forms.TextBox Property_Name;
        public System.Windows.Forms.TextBox Unit_Number;
        private System.Windows.Forms.Button Add_Record;
        private System.Windows.Forms.Label label3;
        public System.Windows.Forms.TextBox Reservation_Number_Txt;
        private System.Windows.Forms.Label label4;
        public System.Windows.Forms.TextBox Security_Deposit;
        private System.Windows.Forms.Label label5;
        public System.Windows.Forms.TextBox Type_of_Payment;
        private System.Windows.Forms.Label label6;
        public System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.Label label7;
        public System.Windows.Forms.TextBox Last_Name;
        private System.Windows.Forms.Label label8;
        public System.Windows.Forms.TextBox First_Name;
        private System.Windows.Forms.Label label9;
        public System.Windows.Forms.TextBox Middle_Name;
        private System.Windows.Forms.Label label10;
        public System.Windows.Forms.TextBox textBox2;
        private System.Windows.Forms.Label label11;
        public System.Windows.Forms.TextBox City;
        private System.Windows.Forms.Label label12;
        public System.Windows.Forms.TextBox State;
        private System.Windows.Forms.Label label13;
        public System.Windows.Forms.TextBox Zip_Code;
        private System.Windows.Forms.Label label14;
        public System.Windows.Forms.TextBox Driver_License;
        private System.Windows.Forms.Label label15;
        public System.Windows.Forms.TextBox Social_Security;
        private System.Windows.Forms.Label label16;
        public System.Windows.Forms.TextBox Home_Phone;
        private System.Windows.Forms.Label label17;
        public System.Windows.Forms.TextBox Work_Phone;
        private System.Windows.Forms.Label label18;
        public System.Windows.Forms.TextBox Credit_Card;
        private System.Windows.Forms.Label label19;
        public System.Windows.Forms.TextBox Date_Moved_In_Planned;
        private System.Windows.Forms.Label label20;
        public System.Windows.Forms.TextBox Date_Reserved;
        private System.Windows.Forms.Label label21;
        public System.Windows.Forms.TextBox Reservation_Cancelled;
        private System.Windows.Forms.Label label22;
        public System.Windows.Forms.TextBox Lease_Months;
    }
}

Reservation2 Designer:
namespace Apartment_Management
{
    partial class Reservation2
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.dataGridView1 = new System.Windows.Forms.DataGridView();
            this.aMS_2007DataSet = new Apartment_Management.AMS_2007DataSet();
            this.reservationBindingSource = new System.Windows.Forms.BindingSource(this.components);
            this.reservationNumberDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.propertyNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.unitNumberDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.securityDepositDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.typeofPaymentDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.instrumentNumberDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.lastNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.firstNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.middleDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.permanentAddressDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.cityDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.stateDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.zipCodeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.driverLicenseDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.socialSecurityDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.creditCardDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.workPhoneDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.homePhoneDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.dateReservedDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.dateMovedInPlannedDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.leaseMonthsDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.reservationCancelledDataGridViewCheckBoxColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.aMS_2007DataSet)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.reservationBindingSource)).BeginInit();
            this.SuspendLayout();
            //
            // dataGridView1
            //
            this.dataGridView1.AutoGenerateColumns = false;
            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.reservationNumberDataGridViewTextBoxColumn,
            this.propertyNameDataGridViewTextBoxColumn,
            this.unitNumberDataGridViewTextBoxColumn,
            this.securityDepositDataGridViewTextBoxColumn,
            this.typeofPaymentDataGridViewTextBoxColumn,
            this.instrumentNumberDataGridViewTextBoxColumn,
            this.lastNameDataGridViewTextBoxColumn,
            this.firstNameDataGridViewTextBoxColumn,
            this.middleDataGridViewTextBoxColumn,
            this.permanentAddressDataGridViewTextBoxColumn,
            this.cityDataGridViewTextBoxColumn,
            this.stateDataGridViewTextBoxColumn,
            this.zipCodeDataGridViewTextBoxColumn,
            this.driverLicenseDataGridViewTextBoxColumn,
            this.socialSecurityDataGridViewTextBoxColumn,
            this.creditCardDataGridViewTextBoxColumn,
            this.workPhoneDataGridViewTextBoxColumn,
            this.homePhoneDataGridViewTextBoxColumn,
            this.dateReservedDataGridViewTextBoxColumn,
            this.dateMovedInPlannedDataGridViewTextBoxColumn,
            this.leaseMonthsDataGridViewTextBoxColumn,
            this.reservationCancelledDataGridViewCheckBoxColumn});
            this.dataGridView1.DataSource = this.reservationBindingSource;
            this.dataGridView1.Location = new System.Drawing.Point(40, 65);
            this.dataGridView1.Name = "dataGridView1";
            this.dataGridView1.RowHeadersWidth = 51;
            this.dataGridView1.RowTemplate.Height = 24;
            this.dataGridView1.Size = new System.Drawing.Size(878, 463);
            this.dataGridView1.TabIndex = 0;
            //
            // aMS_2007DataSet
            //
            this.aMS_2007DataSet.DataSetName = "AMS_2007DataSet1";
            this.aMS_2007DataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
            //
            // reservationBindingSource
            //
            this.reservationBindingSource.DataMember = "Reservation";
            this.reservationBindingSource.DataSource = this.aMS_2007DataSet;
            //
            // reservationNumberDataGridViewTextBoxColumn
            //
            this.reservationNumberDataGridViewTextBoxColumn.DataPropertyName = "Reservation_Number";
            this.reservationNumberDataGridViewTextBoxColumn.HeaderText = "Reservation_Number";
            this.reservationNumberDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.reservationNumberDataGridViewTextBoxColumn.Name = "reservationNumberDataGridViewTextBoxColumn";
            this.reservationNumberDataGridViewTextBoxColumn.Width = 125;
            //
            // propertyNameDataGridViewTextBoxColumn
            //
            this.propertyNameDataGridViewTextBoxColumn.DataPropertyName = "Property_Name";
            this.propertyNameDataGridViewTextBoxColumn.HeaderText = "Property_Name";
            this.propertyNameDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.propertyNameDataGridViewTextBoxColumn.Name = "propertyNameDataGridViewTextBoxColumn";
            this.propertyNameDataGridViewTextBoxColumn.Width = 125;
            //
            // unitNumberDataGridViewTextBoxColumn
            //
            this.unitNumberDataGridViewTextBoxColumn.DataPropertyName = "Unit_Number";
            this.unitNumberDataGridViewTextBoxColumn.HeaderText = "Unit_Number";
            this.unitNumberDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.unitNumberDataGridViewTextBoxColumn.Name = "unitNumberDataGridViewTextBoxColumn";
            this.unitNumberDataGridViewTextBoxColumn.Width = 125;
            //
            // securityDepositDataGridViewTextBoxColumn
            //
            this.securityDepositDataGridViewTextBoxColumn.DataPropertyName = "Security_Deposit";
            this.securityDepositDataGridViewTextBoxColumn.HeaderText = "Security_Deposit";
            this.securityDepositDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.securityDepositDataGridViewTextBoxColumn.Name = "securityDepositDataGridViewTextBoxColumn";
            this.securityDepositDataGridViewTextBoxColumn.Width = 125;
            //
            // typeofPaymentDataGridViewTextBoxColumn
            //
            this.typeofPaymentDataGridViewTextBoxColumn.DataPropertyName = "Type_of_Payment";
            this.typeofPaymentDataGridViewTextBoxColumn.HeaderText = "Type_of_Payment";
            this.typeofPaymentDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.typeofPaymentDataGridViewTextBoxColumn.Name = "typeofPaymentDataGridViewTextBoxColumn";
            this.typeofPaymentDataGridViewTextBoxColumn.Width = 125;
            //
            // instrumentNumberDataGridViewTextBoxColumn
            //
            this.instrumentNumberDataGridViewTextBoxColumn.DataPropertyName = "Instrument_Number";
            this.instrumentNumberDataGridViewTextBoxColumn.HeaderText = "Instrument_Number";
            this.instrumentNumberDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.instrumentNumberDataGridViewTextBoxColumn.Name = "instrumentNumberDataGridViewTextBoxColumn";
            this.instrumentNumberDataGridViewTextBoxColumn.Width = 125;
            //
            // lastNameDataGridViewTextBoxColumn
            //
            this.lastNameDataGridViewTextBoxColumn.DataPropertyName = "Last_Name";
            this.lastNameDataGridViewTextBoxColumn.HeaderText = "Last_Name";
            this.lastNameDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.lastNameDataGridViewTextBoxColumn.Name = "lastNameDataGridViewTextBoxColumn";
            this.lastNameDataGridViewTextBoxColumn.Width = 125;
            //
            // firstNameDataGridViewTextBoxColumn
            //
            this.firstNameDataGridViewTextBoxColumn.DataPropertyName = "First_Name";
            this.firstNameDataGridViewTextBoxColumn.HeaderText = "First_Name";
            this.firstNameDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.firstNameDataGridViewTextBoxColumn.Name = "firstNameDataGridViewTextBoxColumn";
            this.firstNameDataGridViewTextBoxColumn.Width = 125;
            //
            // middleDataGridViewTextBoxColumn
            //
            this.middleDataGridViewTextBoxColumn.DataPropertyName = "Middle";
            this.middleDataGridViewTextBoxColumn.HeaderText = "Middle";
            this.middleDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.middleDataGridViewTextBoxColumn.Name = "middleDataGridViewTextBoxColumn";
            this.middleDataGridViewTextBoxColumn.Width = 125;
            //
            // permanentAddressDataGridViewTextBoxColumn
            //
            this.permanentAddressDataGridViewTextBoxColumn.DataPropertyName = "Permanent_Address";
            this.permanentAddressDataGridViewTextBoxColumn.HeaderText = "Permanent_Address";
            this.permanentAddressDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.permanentAddressDataGridViewTextBoxColumn.Name = "permanentAddressDataGridViewTextBoxColumn";
            this.permanentAddressDataGridViewTextBoxColumn.Width = 125;
            //
            // cityDataGridViewTextBoxColumn
            //
            this.cityDataGridViewTextBoxColumn.DataPropertyName = "City";
            this.cityDataGridViewTextBoxColumn.HeaderText = "City";
            this.cityDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.cityDataGridViewTextBoxColumn.Name = "cityDataGridViewTextBoxColumn";
            this.cityDataGridViewTextBoxColumn.Width = 125;
            //
            // stateDataGridViewTextBoxColumn
            //
            this.stateDataGridViewTextBoxColumn.DataPropertyName = "State";
            this.stateDataGridViewTextBoxColumn.HeaderText = "State";
            this.stateDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.stateDataGridViewTextBoxColumn.Name = "stateDataGridViewTextBoxColumn";
            this.stateDataGridViewTextBoxColumn.Width = 125;
            //
            // zipCodeDataGridViewTextBoxColumn
            //
            this.zipCodeDataGridViewTextBoxColumn.DataPropertyName = "Zip_Code";
            this.zipCodeDataGridViewTextBoxColumn.HeaderText = "Zip_Code";
            this.zipCodeDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.zipCodeDataGridViewTextBoxColumn.Name = "zipCodeDataGridViewTextBoxColumn";
            this.zipCodeDataGridViewTextBoxColumn.Width = 125;
            //
            // driverLicenseDataGridViewTextBoxColumn
            //
            this.driverLicenseDataGridViewTextBoxColumn.DataPropertyName = "Driver_License";
            this.driverLicenseDataGridViewTextBoxColumn.HeaderText = "Driver_License";
            this.driverLicenseDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.driverLicenseDataGridViewTextBoxColumn.Name = "driverLicenseDataGridViewTextBoxColumn";
            this.driverLicenseDataGridViewTextBoxColumn.Width = 125;
            //
            // socialSecurityDataGridViewTextBoxColumn
            //
            this.socialSecurityDataGridViewTextBoxColumn.DataPropertyName = "Social_Security";
            this.socialSecurityDataGridViewTextBoxColumn.HeaderText = "Social_Security";
            this.socialSecurityDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.socialSecurityDataGridViewTextBoxColumn.Name = "socialSecurityDataGridViewTextBoxColumn";
            this.socialSecurityDataGridViewTextBoxColumn.Width = 125;
            //
            // creditCardDataGridViewTextBoxColumn
            //
            this.creditCardDataGridViewTextBoxColumn.DataPropertyName = "Credit_Card";
            this.creditCardDataGridViewTextBoxColumn.HeaderText = "Credit_Card";
            this.creditCardDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.creditCardDataGridViewTextBoxColumn.Name = "creditCardDataGridViewTextBoxColumn";
            this.creditCardDataGridViewTextBoxColumn.Width = 125;
            //
            // workPhoneDataGridViewTextBoxColumn
            //
            this.workPhoneDataGridViewTextBoxColumn.DataPropertyName = "Work_Phone";
            this.workPhoneDataGridViewTextBoxColumn.HeaderText = "Work_Phone";
            this.workPhoneDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.workPhoneDataGridViewTextBoxColumn.Name = "workPhoneDataGridViewTextBoxColumn";
            this.workPhoneDataGridViewTextBoxColumn.Width = 125;
            //
            // homePhoneDataGridViewTextBoxColumn
            //
            this.homePhoneDataGridViewTextBoxColumn.DataPropertyName = "Home_Phone";
            this.homePhoneDataGridViewTextBoxColumn.HeaderText = "Home_Phone";
            this.homePhoneDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.homePhoneDataGridViewTextBoxColumn.Name = "homePhoneDataGridViewTextBoxColumn";
            this.homePhoneDataGridViewTextBoxColumn.Width = 125;
            //
            // dateReservedDataGridViewTextBoxColumn
            //
            this.dateReservedDataGridViewTextBoxColumn.DataPropertyName = "Date_Reserved";
            this.dateReservedDataGridViewTextBoxColumn.HeaderText = "Date_Reserved";
            this.dateReservedDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.dateReservedDataGridViewTextBoxColumn.Name = "dateReservedDataGridViewTextBoxColumn";
            this.dateReservedDataGridViewTextBoxColumn.Width = 125;
            //
            // dateMovedInPlannedDataGridViewTextBoxColumn
            //
            this.dateMovedInPlannedDataGridViewTextBoxColumn.DataPropertyName = "Date_Moved_In_Planned";
            this.dateMovedInPlannedDataGridViewTextBoxColumn.HeaderText = "Date_Moved_In_Planned";
            this.dateMovedInPlannedDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.dateMovedInPlannedDataGridViewTextBoxColumn.Name = "dateMovedInPlannedDataGridViewTextBoxColumn";
            this.dateMovedInPlannedDataGridViewTextBoxColumn.Width = 125;
            //
            // leaseMonthsDataGridViewTextBoxColumn
            //
            this.leaseMonthsDataGridViewTextBoxColumn.DataPropertyName = "Lease_Months";
            this.leaseMonthsDataGridViewTextBoxColumn.HeaderText = "Lease_Months";
            this.leaseMonthsDataGridViewTextBoxColumn.MinimumWidth = 6;
            this.leaseMonthsDataGridViewTextBoxColumn.Name = "leaseMonthsDataGridViewTextBoxColumn";
            this.leaseMonthsDataGridViewTextBoxColumn.Width = 125;
            //
            // reservationCancelledDataGridViewCheckBoxColumn
            //
            this.reservationCancelledDataGridViewCheckBoxColumn.DataPropertyName = "Reservation_Cancelled";
            this.reservationCancelledDataGridViewCheckBoxColumn.HeaderText = "Reservation_Cancelled";
            this.reservationCancelledDataGridViewCheckBoxColumn.MinimumWidth = 6;
            this.reservationCancelledDataGridViewCheckBoxColumn.Name = "reservationCancelledDataGridViewCheckBoxColumn";
            this.reservationCancelledDataGridViewCheckBoxColumn.Width = 125;
            //
            // Reservation2
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(944, 567);
            this.Controls.Add(this.dataGridView1);
            this.Name = "Reservation2";
            this.Text = "Reservation2";
            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.aMS_2007DataSet)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.reservationBindingSource)).EndInit();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.DataGridView dataGridView1;
        private System.Windows.Forms.DataGridViewTextBoxColumn reservationNumberDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn propertyNameDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn unitNumberDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn securityDepositDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn typeofPaymentDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn instrumentNumberDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn lastNameDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn firstNameDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn middleDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn permanentAddressDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn cityDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn stateDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn zipCodeDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn driverLicenseDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn socialSecurityDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn creditCardDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn workPhoneDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn homePhoneDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn dateReservedDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn dateMovedInPlannedDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn leaseMonthsDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewCheckBoxColumn reservationCancelledDataGridViewCheckBoxColumn;
        private System.Windows.Forms.BindingSource reservationBindingSource;
        private AMS_2007DataSet aMS_2007DataSet;
    }
}
 
C#:
this.Date_Reserved.TextChanged += new System.EventHandler(this.Reservation1_Load);

Why would one want to run a Form Load event handler every time the text in a textbox changes?
 
Imported your code, works for me:

1671743272321.png


Might need to see the full code (in a zip file, without the BIN or OBJ folders)
 
Back
Top Bottom