stanmurphy
asked on
ActiveX Date Picker problem
I have a form with a private data session. There are two date pickers, oleControl1 and Olecontrol2.
I've checked both the form and the date controls and all properties are set to default. There is no code modifying or accessing the date pickers other than what I've attached.
The problem is that when I run this code, dSEARCHDATE1 end up with a date while dSEARCHDATE2 ends up as ( / / ).
Both the date pickers are displaying dates when the code is run.
Does anyone know why this is happening?
Thank you.
I've checked both the form and the date controls and all properties are set to default. There is no code modifying or accessing the date pickers other than what I've attached.
The problem is that when I run this code, dSEARCHDATE1 end up with a date while dSEARCHDATE2 ends up as ( / / ).
Both the date pickers are displaying dates when the code is run.
Does anyone know why this is happening?
Thank you.
LOCAL nCOUNTER, nAPPT_NOT_COMPLETE, nARRAY_ROW, nARRAY_COL, nBAD_APPT_COUNTER, dSEARCHDATE1, dSEARCHDATE1
STORE 1 TO nARRAY_ROW, nARRAY_COL
STORE 0 TO nBAD_APPT_COUNTER
STORE "" TO dSEARCHDATE1, dSEARCHDATE2
STORE .T. TO lAPPT_NOT_COMPLETE
DIMENSION aINCOMPLETE_APPT(2000,2)
STORE CTOD(ALLT(STR(THISFORM.OLECONTROL1.OBJECT.Day))+"/"+ALLTRIM(STR(THISFORM.OLECONTROL1.OBJECT.Month))+"/"+ALLTRIM(STR(THISFORM.OLECONTROL1.OBJECT.Year))) TO dSEARCHDATE1
STORE CTOD(ALLT(STR(THISFORM.OLECONTROL2.OBJECT.Day))+"/"+ALLTRIM(STR(THISFORM.OLECONTROL2.OBJECT.Month))+"/"+ALLTRIM(STR(THISFORM.OLECONTROL2.OBJECT.Year))) TO dSEARCHDATE2
ASKER
I suppose I should mention that this code resides in the Click event of a button on the form.
And that the OleControl objects were picked from the OLE button on Foxpro's Toolbox buttonbar.
And that the OleControl objects were picked from the OLE button on Foxpro's Toolbox buttonbar.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you. You're solution as to how to store the date properly worked perfectly. That was the problem. Thank you!!
ASKER