Skip to main content

[Migrated content. Thread originally posted on 22 January 2003]

I am trying to use Active-X control ?Calendar Control 8.0? . This works fine, but would like to be able to capture the date in a variable when the user choice a date in the calendar. How I can do it?.

[Migrated content. Thread originally posted on 22 January 2003]

I am trying to use Active-X control ?Calendar Control 8.0? . This works fine, but would like to be able to capture the date in a variable when the user choice a date in the calendar. How I can do it?.
In Calendar EVENT-CLICK :

INQUIRE Calendar-name, Day IN your-Day-variable, Month IN your-Month-variable, Year IN your-Year-variable

I try it in "Calendar Control 10.0" but i think it also works and for version 8.0

[Migrated content. Thread originally posted on 22 January 2003]

I am trying to use Active-X control ?Calendar Control 8.0? . This works fine, but would like to be able to capture the date in a variable when the user choice a date in the calendar. How I can do it?.
In Calendar EVENT-CLICK :

INQUIRE Calendar-name, Day IN your-Day-variable, Month IN your-Month-variable, Year IN your-Year-variable

I try it in "Calendar Control 10.0" but i think it also works and for version 8.0

[Migrated content. Thread originally posted on 22 January 2003]

I am trying to use Active-X control ?Calendar Control 8.0? . This works fine, but would like to be able to capture the date in a variable when the user choice a date in the calendar. How I can do it?.
bms is absolutely right, it might however be useful to see the entire context. Assuming you have the calendar in the screen section like this:

03 report-cal-1, calendar,
col 20.60, line 10.10, lines 17.10 cells,
size 29.00 cells,
event procedure cal-event.

cal-event would for instance be like this:

cal-event.
evaluate event-type
when msg-ax-event
evaluate event-data-2
when calendarclick
inquire report-cal-1, month IN work-month
inquire report-cal-1, day IN work-day
inquire report-cal-1, year IN work-year
when other
continue
end-evaluate
when other
continue
end-evaluate.

Presuming that work-month, work-day and work-year has been defined as numeric variable, for instance PIC 9(04). Keep in mind the size of the PIC 9 item. In that year returns a 4 digit year.

[Migrated content. Thread originally posted on 22 January 2003]

I am trying to use Active-X control ?Calendar Control 8.0? . This works fine, but would like to be able to capture the date in a variable when the user choice a date in the calendar. How I can do it?.
bms is absolutely right, it might however be useful to see the entire context. Assuming you have the calendar in the screen section like this:

03 report-cal-1, calendar,
col 20.60, line 10.10, lines 17.10 cells,
size 29.00 cells,
event procedure cal-event.

cal-event would for instance be like this:

cal-event.
evaluate event-type
when msg-ax-event
evaluate event-data-2
when calendarclick
inquire report-cal-1, month IN work-month
inquire report-cal-1, day IN work-day
inquire report-cal-1, year IN work-year
when other
continue
end-evaluate
when other
continue
end-evaluate.

Presuming that work-month, work-day and work-year has been defined as numeric variable, for instance PIC 9(04). Keep in mind the size of the PIC 9 item. In that year returns a 4 digit year.