By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,702 Members | 1,771 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,702 IT Pros & Developers. It's quick & easy.

DateTimePicker not updating in DB unless I change the date

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
Tony,

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

Cor
Oct 16 '07 #2

P: n/a

"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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.