I use the oleCalendar in a form and it works fine, like this:
#DEFINE C_CALCAPTION_LOC "Abgleich-Kalender"
oCalForm = Create('form')
oCalForm.NewObject("oleCalendar","app_olecalendar","libs\mahnwesen_app.vcx")
IF EMPTY(thisform.Abgleichtag.Value) then
thisform.Abgleichtag.Value = DATE() && ControlSource is linked to view lv_abgleich.mzy_datum
EndIf
WITH oCalForm.oleCalendar
.date_column = "lv_abgleich.mzy_datum"
.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)
Now, in another form the same method is used except that the textbox Abgleichtag in not linked to a view any more and therefore I changed the statement “ .date_column = "lv_abgleich.mzy_datum" to .date_column = "thisform. Abgleichtag.Value".
However, this returns an error message “Unknown member Abgleichtag”.
Has someone an idea how to solve this problem?
Klaus
#DEFINE C_CALCAPTION_LOC "Abgleich-Kalender"
oCalForm = Create('form')
oCalForm.NewObject("oleCalendar","app_olecalendar","libs\mahnwesen_app.vcx")
IF EMPTY(thisform.Abgleichtag.Value) then
thisform.Abgleichtag.Value = DATE() && ControlSource is linked to view lv_abgleich.mzy_datum
EndIf
WITH oCalForm.oleCalendar
.date_column = "lv_abgleich.mzy_datum"
.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)
Now, in another form the same method is used except that the textbox Abgleichtag in not linked to a view any more and therefore I changed the statement “ .date_column = "lv_abgleich.mzy_datum" to .date_column = "thisform. Abgleichtag.Value".
However, this returns an error message “Unknown member Abgleichtag”.
Has someone an idea how to solve this problem?
Klaus