473,322 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

DateTimePicker and the Checked property

I've got a database application that uses the DateTimePicker to display/edit a person's birthdate. I'd like to use the .Checked property to determine if I want to write the date to the DB, but the behavior isn't what I expect. It seems that if I check or uncheck the DTP checkbox, the .Checked property doesn't always reflect that status.

Ideally, when the box is checked and a date has been selected, I want to write the date to the DB. If the DTP is not checked, I want to write a NULL to the database. I'm checking the .checked property before I write to the DB and I find that it's not always reflective of the current state of the DTP checkbox.

If (dtpBirth.Checked) Then
<write the date to the db>
Else
<write null to the db>
End If

Any ideas as to what I'm doing wrong? (Win XP Pro, .NET1.1, VB, FYI)
Thanks!
Mike
Nov 20 '05 #1
1 1572
* "=?Utf-8?B?TWlrZSBFYXRvbg==?=" <Mike Ea***@discussions.microsoft.com> scripsit:
I've got a database application that uses the DateTimePicker to
display/edit a person's birthdate. I'd like to use the .Checked
property to determine if I want to write the date to the DB, but the
behavior isn't what I expect. It seems that if I check or uncheck the
DTP checkbox, the .Checked property doesn't always reflect that status.


AFAIK, the checkbox is buggy, at least on some systems.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Carlos Hernandez | last post by:
Does someone knows why in the datetimepicker control the checked property doesnt work fine. Sometimes it is checked and the property returns false. Has someone had this problems. Thanks.
9
by: Guy | last post by:
I have extended the datetimepicker control to incorporate a ReadOnly property. I have used the new keyword to implement my own version of the value property, so that if readonly == true then it...
0
by: Dan Cimpoiesu | last post by:
I found a nasty bug in the DateTimePicker control when enabling visual styles for the application. It seems that if the control has the ShowCheckBox=true, and also is Checked and if a user click...
1
by: John Smith | last post by:
Hey folks, Got some strange behavior going on here. I have a datetimepicker with showcheckbox = true; If I set Checked=true and set the Text of the datetimepicker, then then the Checked...
4
by: Jacek Jurkowski | last post by:
.... the minimum date of DateTimePicker is 1753-01-01. How to make DateTime to do not show nothing in its text if this date is the value? I have a form with a field LastLogonDate. If user hasn't...
0
by: David Batt | last post by:
Hello, I'm using a custom control called datetimeslicker which inherits from the datetimepicker contro and it allows you to bind null values to datetimepickers, the code for this is attached ...
7
by: Pieter | last post by:
Hi, I'm looking for a DateTimePicker that supports 100% databinding (and support null-values)... It's a shame that the normal control doesn't, but when searching on the internet, I didn't find...
0
by: tschroeder250 | last post by:
Hi Everyone, There are so many Nullable DateTimePickers out there that this post may not even be found among all the others, but I wanted to try. First, I want to thank all the authors of the...
0
by: priyamtheone | last post by:
I'm trying to make a datagridview column to act like a datetimepicker column (C#.Net 2005). These are the behaviours that the dgv should have: 1) Initially all the cells of the dtp column should be...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.