What I have is a Window.NET application with many date fields on it. Sometimes I will not want to update every date field on the screen, but everytime time I update the DB is stores the dates. What I did was to initiate the fields to a blank and this works, except for one thing. When I pick the date field that I want to update and click on the date it returns a blank field back and it just so happens to update the DB, but I never saw the date in the datetimepicker box.
What I would like to do is this. Bring screen up with blank values in the date boxes, then choose the field that I want to update, click on date, date shows up in box, then I update the DB with that value, but the other date fields that I didn't choose I want them not to anything.
I would appreciate the help. This is the last thing I need to correct and I will be finished with my first project.
Thanks,
Ben
Loading

FroglegRank #1,020 · 1.9K reputationPosted Mar 8, 2011, 9:40 PM EST
private void Form1_Load(object sender, EventArgs e)
{
dateTimePicker1.CustomFormat = " ";
dateTimePicker1.Format = DateTimePickerFormat.Custom;
}
private void dateTimePicker1_ValueChanged_1(object sender, EventArgs e)
{
dateTimePicker1.Format = DateTimePickerFormat.Short;
}
Suthish NairRank #92 · 22.8K reputationPosted Mar 10, 2011, 7:32 AM EST
Sam HobbsRank #107 · 20.5K reputationPosted Mar 10, 2011, 8:43 AM EST