! ActiveX Calendar Control !

  • Thread starter Thread starter Wembly
  • Start date Start date
W

Wembly

Hi,

Please disregard my previous post.

When a text field is double clicked, it loads the calendar
form, which contains an ActiveX calendar control.

I was wondering if the following can be done in the
calendar form, when the user double clicks on the
calendar. I want to return the date to the text field:

dim currentForm as Form
dim currentControl as Control

set currentForm = screen.activeForm
set currentControl = screen.activeControl

With currentForm
!currentControl = Format(Me.acxCalendar, "Short Date")
End With

The way it is at the moment, an error msg says that it
cannot find the field "currentControl" referred to in the
expression.

Thanks

Wembly
 
Wembly said:
Hi,

Please disregard my previous post.

When a text field is double clicked, it loads the calendar
form, which contains an ActiveX calendar control.

I was wondering if the following can be done in the
calendar form, when the user double clicks on the
calendar. I want to return the date to the text field:

dim currentForm as Form
dim currentControl as Control

set currentForm = screen.activeForm
set currentControl = screen.activeControl

With currentForm
!currentControl = Format(Me.acxCalendar, "Short Date")
End With

The way it is at the moment, an error msg says that it
cannot find the field "currentControl" referred to in the
expression.

That's because currentControl is the name of a Control object, not the
name of a control on the form. But it's redundant anyway. Just write

Screen.ActiveControl = Format(Me.acxCalendar, "Short Date")
 
Back
Top