If you are using vb 2005 then you don't need to dim a new form just load the second form. Just make sure that the "Shutdown" in the Projects is set to "When last form closes". If it is set to "When startup form closes" then as soon as you close form1 then the program ends.
frmattendance.txttdays.Text = days
frmattendance.l2.Text = dtp.Text
If you are using vb 2002 or 2003 try this. I don't have either but this should work.
Dim f As New frmattendance
f.txttdays.Text = days
f.l2.Text = dtp.Text
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...