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

Problem with date picker on form

P: n/a
I'm using Office 2007. I have a text field called txtDate which is
formatted to medium date. This gives me the date picker when the
control has the focus.

I have several other text controls whose values change depending on
the value in txtDate.

If I type in the date in txtDate and press enter, all of the other
controls change as expected. However, if I use the date picker to
change date, the other values don't change, even though the date
displayed in txtDate changes. It appears that although date picker is
displaying the correct date in txtDate, txtDate.value is not being

Does this make sense? How do I make date picker behave as if I had
typed in the date and pressed return?

Thanks for any help

Aug 6 '08 #1
Share this Question
Share on Google+
1 Reply

P: n/a
I'm assuming that the code that assigns values to your other textboxes
resides in the AfterUpdate event of your date field; this is the standard way
of handling this. The problem is that textbox AfterUpdates, OnChanges and
other similar events are only triggered if data is physically entered into
them. If values are entered programatically, they're not fired.

What you need to do is to tie triggering the AfteUpdate event of your date
field with some other event. What comes to mind is the date field's OnExit

Private Sub DateTextBox_Exit(Cancel As Integer)
End Sub

I don't have ACC2007 with it's native Calendar thinggie to test this, but
when you move out of the box after having entered the date thru the calendar,
this should do the trick.

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via

Aug 6 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.