473,385 Members | 2,210 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,385 software developers and data experts.

DateTimePicker not updating in DB unless I change the date

Does anyone know why my 2 date fields on my form that are bound to date
fields in the Access DB do not save unless I first modify the dates?
Example: When I add a new record, the following line of code executes adding
5 days to the current date.
Me.DateRequiredDateTimePicker.Value = Today.AddDays(5)

If I do not change the dates on the form for the 2 fields ( one is today's
date, one is a date 5 days in the future ) they do not get saved/updated to
the database. If I highlight either the month, day or year and change it
then change it back the fields get saved.

Thanks,

Tony K.

Oct 16 '07 #1
3 2628
Tony,

In the way you describe it, it is in my idea exactly as it should be.

Cor
Oct 16 '07 #2

"Cor Ligthert[MVP]" <no************@planet.nlwrote in message
news:AB**********************************@microsof t.com...
Tony,

In the way you describe it, it is in my idea exactly as it should be.
Cor
Ok... New record. The DateTimePickers (2) already have dates in them. The
rest of the text boxes on my vb form are blank. I fill in the textboxes.
Click Save. Open the database and the record is there, but the date fields
are blank. Null. Nothing there.

Same scenario but if I change the date fields then change them back to what
they originally were when I clicked new record, they get added with the
other info.

If that is how it should be then I'll find something else. If makes more
sense and it should not be that way, then I'm sorry for not clarifying the
first time.

Thanks,

Tony K.

Oct 17 '07 #3
Tony,

Did you databind the value of your DateTime picker to the Data column you
are using?

You do that with that closed DataBinding box which is in top of your
propertie settings as it is in non alphabetic mode.

Cor

Oct 17 '07 #4

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

Similar topics

0
by: Bhavna | last post by:
I have a datetimepicker (dtp) on my windows form the user initially selects a date and then selects the rooms they wish to book The problem i have is that when the user goes back and tries to...
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...
2
by: LC | last post by:
I am on the learn C#. Net in 695 day program. I am just trying to learn stuff. I have MSAccess database with 1 table called 'ParmDate' with 1 column called 'ParmDate' which represents a date for...
3
by: Darin | last post by:
Is there a way to, at runtime, change a textbox to be a datetimepicker? I have a form that I allow the user to specify what field types the input boxes are. They can be regular text, integer,...
2
by: Chris Fairman | last post by:
NG, Maybe I'm missing a key step, but it seems when typing dates into a DateTimePicker control (format = 'Short'), the controls' .text property is not updated until the control losses focus. ...
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...
2
by: Claes Wedin | last post by:
My customer needs a DateTimePicker in VS2005 C# that can show emty date values (blank/space/null). I need a control that: 1. Can show a blank value 2. Detete a date when hitting the delete...
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...
11
by: jessy | last post by:
Hi, I have a problem with my DateTimePicker javascript code which i downloaded , the problem is when i pick the date and the date appears in my Text Field and i click Submit the date which i picked...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.