DateTimePicker and DataBinding

  • Thread starter Thread starter MigrationUser 1
  • Start date Start date
M

MigrationUser 1

Guest
Ive set my DateTimePickers text property bound to a DateTime field in my Access Table ( because it gave me error if I bound the value property instead). When adding a new record from my form, I pre-set my DateTimePickers text and value property to System.DateTime.Today and System.DateTime.Today.ToString() respectively. Since the "Today" value is used most of the time, the user doesnt need to select a date from the DateTimePicker, since the default is shown. My problem is, if the user does not choose a value from the DateTimePicker (because using the default is good enough), then during database update, the date value is not saved to the database; while if user choose another value other then the default, the value can be saved to the database successfully. Is there a way to ensure the default value can be saved to the database?

Continue reading...
 
Back
Top