James
asked on
Is there an event when date is selected via date picker in Microsoft Access?
I have a text box for entering a date and it is set to use Access 2010's built-in date picker. Is there an event that fires when someone selects a date via the date picker? When I select a date via the date picker, it updates the date in the field but the before update and after update events of the field don't fire until I try leaving the field.
Thanks in advance!
Thanks in advance!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
One more question ... is there a way to distinguish in then OnChange event between a change that came from selecting a date in the date picker and a change that is the result of typing in the field? Because now it works fine if they choose a date via the date picker but if they try typing a date, the event fires with every keystroke.
What I'm trying to do is execute code when a date is entered - either be typing or via the date picker.
What I'm trying to do is execute code when a date is entered - either be typing or via the date picker.
You could add a check in the OnChange event like this:
If IsDate(Me.NameOfDatePicker Control.Te xt) And Me.NameOfDatePickerControl .Text Like "*/*/####" Then
Ron
If IsDate(Me.NameOfDatePicker
Ron
ASKER