PC Review


Reply
Thread Tools Rate Thread

! ActiveX Calendar Control !

 
 
Wembly
Guest
Posts: n/a
 
      10th Nov 2003
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
 
Reply With Quote
 
 
 
 
Dirk Goldgar
Guest
Posts: n/a
 
      10th Nov 2003
"Wembly" <(E-Mail Removed)> wrote in message
news:04ea01c3a74d$99b51e10$(E-Mail Removed)
> 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")

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveX Control: Calendar Confused Slug Microsoft Access Form Coding 0 16th Nov 2009 05:11 PM
ActiveX Control:Calendar BillD Microsoft Access 2 21st Oct 2008 01:27 AM
Calendar ActiveX control 9.0 =?Utf-8?B?WWFuaWNr?= Microsoft Access Form Coding 2 17th Nov 2004 04:13 PM
Re: Need ActiveX Calendar Control Joel Microsoft Access Forms 0 24th Mar 2004 05:46 AM
ActiveX Calendar Control would_love_some_help Microsoft Access Forms 1 3rd Jul 2003 01:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:22 PM.