General information
Title:
Calendar in my application
I want to have a calendar in my application, the following code only works on my work station(development environment) with vfp 7.0 installed, and it gives me ole error 1426 when I run the app on any other work stations.
any help
the error message is
error 1426
OLE error code 0x80040154: Class not registered.
the code is in the right click event for a date filed called Load date
the control source is v_morder.load_date
#DEFINE C_CALCAPTION_LOC "Data Calendar"
oCalForm = Create('form')
oCalForm.NewObject("oleCalendar","_olecalendar","_datetime")
WITH oCalForm.oleCalendar
.date_column = "v_morder.load_date"
.columnalias = "v_morder"
.RefreshDisplay()
.BackColor = THISFORM.BackColor
.Visible = .T.
ENDWITH
WITH oCalForm
.AutoCenter = .T.
.BorderStyle = 2
.MaxButton = .F.
.MinButton = .F.
.Height = oCalForm.oleCalendar.Height
.Width = oCalForm.oleCalendar.Width
.Caption = C_CALCAPTION_LOC
ENDWITH
oCalForm.Show(1)
This.Value = v_morder.load_date
IF This.Valid()
ELSE
This.Value = this.Parent.uoriginalvalue
replace v_morder.load_date WITH this.Parent.uoriginalvalue IN v_morder
ENDIF
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only