DT Picker OnUpdated event

James Reay

New member
Local time
Today, 07:33
Joined
Apr 1, 2003
Messages
9
I am using an unbound DTPicker in order to control what day's information a particular subform displays.

My problem is that I want the line of code to be executed as soon as a new date is selected.

At the moment I am using the DTPicker's OnLostFocus event to run the line of code required and so obviously the user is required to tab/click out of the control before the code is executed.

I have thought of using the OnUpdated event but whatever I do the code never seems to be executed.

Any suggestions would be much appreciated.
 
I have the same problem and I would like to see the answer to this question
 
What about the Change event?
 
Moniker,
I believe they are referring to the ActiveX MSCAL.Calendar.7 control that does not have an OnChange event. I think everyone should abandon this MS Control and select one from Jeff Conrad's links. There are versioning issues when you use these controls anyway.
 
Hmm... OK then. I looked specifically at the DTPicker control and that one did have a change event. I rarely use those things thought somewhat because of the flakiness a lot of people seem to discover on their own.
 
Hmmm...Moniker, where is the DTPicker control? I don't have one in my list of controls available.
 
Moniker,
I found it in the MSComCtl2.OCX (MSComCtl2.DTPicker.2) which is not usually loaded for me. It does not have a Change event either. Oh well. :(
 
Moniker,
I found it in the MSComCtl2.OCX (MSComCtl2.DTPicker.2) which is not usually loaded for me. It does not have a Change event either. Oh well. :(

That's weird, I have the same thing and it does:

dtpicker01.png


dtpicker02.png
 
Hi Bob,
I have an OnUpdated event just like you but no OnChange event that Moniker described.
 
Ah, yes. I misread that one.

I wonder if Moniker got confused because the same control DOES have many more events, including On Change available in VB6.
 
My bad - there is a Change event on it. You can't access it from the properties window you have to access it from the VBA IDE window.

dtpicker03.png
 
Learn something new every day. I wonder why it is not available in the properties sheet. It never would have occured to me to look there.
 
Last edited:
Learn something new every day. I wonder why it is not available in the properties sheet. It never woulds have occured to me to look there.

I had forgotten that was the case and that it is like that for several other controls as well.
 

Users who are viewing this thread

Back
Top Bottom