How can I close a usercontrol and open another with the same button?

Type so I have a form composed of the 6 buttons and a panel. I want that when I click on the record button that opens usercontrol1 and if I click on the query button closes first usercontrol1 and then opens usercontrol2 …

c # – Store values ​​in variables when changing UserControl

Good day,

I am working on an application which is a form, I have worked on C # using Windows Forms and User Controls.

Here is an example:

enter the description of the image here

This acts as the Windows Form Main, in which the center is a panel where you link the User Controls:

enter the description of the image here

When running the program is as follows:

enter the description of the image here

Pressing the next arrow launches another different form in another User Control.

My question is how I can store the values ​​of textbox, datetimepicker, etc, variables and then store them in a database, what happens is that I can not save them by pressing the button of the date since one is the User Control and another It's Windows Forms and for obvious reasons you can not. I would like to know if there is a User Control event like changing it to do such a thing or something.

Greetings I hope I could explain.