I am having trouble with me .show() function, it will hide the previous page but when it goes to show the new page, it will pop up for a second and then stop debugging to program instantly.
here is the code for the first page.

```
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        private OleDbConnection connection = new OleDbConnection();
        public Form1()
        {

            InitializeComponent();
            connection.ConnectionString =   @"Provider=Microsoft.ACE.OLEDB.12.0;Data  Source=C:\Users\Martha\Documents\Database2.accdb;
        Persist Security Info=False;";  
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            try
            {
                connection.Open();
                connection.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error  " + ex);
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            OleDbCommand command = new OleDbCommand();
            command.Connection = connection;
            command.CommandText = "SELECT * FROM StudentLogin WHERE      Username='" + TXT_NAME.Text + "'AND Password='" + TXT_PASSWORD.Text + "'";

            OleDbDataReader reader = command.ExecuteReader();
            int count = 0;
            while (reader.Read())
            {
                count = count + 1;
            }
            if (count == 1)
            {
                MessageBox.Show("Username and Password are Correct");
                connection.Close();
                connection.Dispose();
                this.Close();
                PAGE_MAIN mainpage1 = new PAGE_MAIN();
                mainpage1.ShowDialog();
            }
            else
            { 
                MessageBox.Show("Username and Password are incorrect");
            }
        }
        private void button2_Click(object sender, EventArgs e)
        {
            if (HELP_LOGIN.Visible == true)
            {
                HELP_LOGIN.Hide();
            }
            else
            {
                HELP_LOGIN.Show();
            }
        }
    }
}

```