G
Guest
Question 1
I have two forms, let say Form1 and Form2. There is datetimepicker control
on Form2. In the Load Event of Form2 I have set the default value of
datetimepicker control to NOW. So as expected when I open the form the
default value is set to today's date. Now I sometimes also call Form2 from
Form1. Ok now here is my problem. Actually when I call Form2 from within
Form1 I want to set the set the value of datetimepicker control to something
else. I have written following code to call form2 from form1 and setting the
value of datetimepicker control:
Dim frm As Form2
frm = New Form2
frm.dtbDOB.value = "1 / 1 / 2005"
frm.showdialog()
I know this is happeneing because when I call form2 from form1, even though
I am setting the value of dtbDOB control but it is overwritten by the value
set in Load Event.
What should I do ?
Question 2
What is the purpose of Text property of DateTimePicker Control ?
Question 3.
How come I don't see the Text property in the properties window, however
when I create an instanace of an form and if that form has datetimepicker
control then I can the Text property
frm.dtpDOB.Text
Thanks in advance.
I have two forms, let say Form1 and Form2. There is datetimepicker control
on Form2. In the Load Event of Form2 I have set the default value of
datetimepicker control to NOW. So as expected when I open the form the
default value is set to today's date. Now I sometimes also call Form2 from
Form1. Ok now here is my problem. Actually when I call Form2 from within
Form1 I want to set the set the value of datetimepicker control to something
else. I have written following code to call form2 from form1 and setting the
value of datetimepicker control:
Dim frm As Form2
frm = New Form2
frm.dtbDOB.value = "1 / 1 / 2005"
frm.showdialog()
I know this is happeneing because when I call form2 from form1, even though
I am setting the value of dtbDOB control but it is overwritten by the value
set in Load Event.
What should I do ?
Question 2
What is the purpose of Text property of DateTimePicker Control ?
Question 3.
How come I don't see the Text property in the properties window, however
when I create an instanace of an form and if that form has datetimepicker
control then I can the Text property
frm.dtpDOB.Text
Thanks in advance.