DateTimePicker with Two Forms
I have a simple problem that is driving me crazy.
On Form1 I have a dateTimePicker
However when the user opens Form2, the value property does not change.
here is some code:
Public Class Form2
Dim myForm1 As Form1
#Region " Windows Form Designer generated code "
Public Sub New()
Me.myForm1 = New Form1
'This call is required by the Windows Form Designer.
radioButtons(0) = RadioButton1
radioButtons(1) = RadioButton2
'Add any initialization after the InitializeComponent() call
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
dateOf = Format(myForm1.DatePicker.Value, "MM/dd/yyyy")'this only returns today's date
myForm1.Patient(doc, patID, vID, svc, cat, dMy, hMs)
can somebody tell me the way to get the changed value of the datetimepicker.value