Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Picker coding

Status
Not open for further replies.

tman138

IS-IT--Management
Nov 27, 2001
128
0
0
US
I have an Access 2010 database which uses a form that has a date picker enabled. What I want to do is requery some other fields on the form when that date changes. What I have found though is the fields 'After Update' event does not fire when the user enters a date using the date picker. I can come close to something usable by using the 'Lost Focus' event but it's kind of a kludge. Has anyone runs across an easy fix?
 
I've tried every event. Nothing triggers on the selection itself. You can change the date as many times as you wnat and never record an event. I have decided to disable the date picker and force the use to manual enter which will then hits the after update event. It's a nice feature ...unless you want to code with it.
 
The AfterUpdate event for the Control holding the date/time data should, indeed, pop when it is being populated via the native DatePicker! By native, I mean the small DatePicker that Access 2007/2010, by default, shows when entering a Textbox that is Bound to Date/Time Field.

You have to move off of the Textbox that holds the data, or Close the Form, before it pops, but that's true of the AfterUpdate event of any Textbox, regardless of how it's populated.

If it's not exhibiting this behavior, best guess would be that the Control itself is corrupted. Although we think in terms of Forms or Databases when corruption is mentioned, Controls can and do become corrupted. Easy solution for that is to Delete then Re-create the Control.

Note that the above is said assuming that you are talking about the built-in DatePicker that came with versions 2007/2010. ActiveX and Form-based DatePickers are a different story! They populate the Textbox through code, and doing so will, indeed, not pop the Control-associated events.

Linq ;0)>

The Missinglinq

Richmond, Virginia

The Devil's in the Details!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top