ActiveX Calendar

hecrowell

New member
Local time
Today, 21:27
Joined
Sep 27, 2000
Messages
2
Office97 - ActiveX Calendar 8.0: I have built a table called ArrivalDate. From this table I have built a form also called ArrivalDate. On the form I have placed an ActiveX Calendar. I want to be able to click on a date on the calendar and have it update the text box on the form.
I have read several messages in this forum but from what I have read, I have not been able to make it work. As it works now, I click a date on the calendar and the text box updates only when I click in the textbox.
Help anyone???
 
I tried using the same format myself, with no luck. Do you have the book,
Access 97 Developers Handbook?

Great book. The authors have provided a great calendar program, that is easy to use, and very effective. Also, check this web site:

http://www.mvps.org/access/

mvps.org has a great calendar program, but I found it does not work on subforms. If you do not have the Access 97 Developers Handbook, send me an e-mail, and I'll send you the chapter database it was in.

Matthew.Davis@voicestream.com

Matthew
 
Private Sub SetDate_Click()
On Error GoTo SetDate_Error


Date = SelectDate.Value
Forms![YourFormName]!YourDateField = Forms!Cal!Date

Exit Sub

SetDate_Error:
MsgBox Err.Description
Exit Sub
End Sub
 
This works for me. It is exactly what you are describing except my works on "double click". And give current date.

In design view of your form where the calendar reside, click on the "Code" command button up at the toobar. You should then be in MS VB. They'll be two long drop down menu at the top. You first want to select your calendar name, in my case it's ActiveXCt10, then select the type of event, in my case it's Double click. Type in the following code:

**************************************
Private Sub ActiveXCtl0_DblClick()
Me![Date2] = Me![ActiveXCtl0].Value
**************************************
Date2 is my field name
ActiveXCt10 is my calendar name

To have cal shows current date, get to the property of your form, Event On Load, insert and Event Procedure as

******************************
Me.YourCalNam.Value = Date
******************************

Good luck!

Neo
 

Users who are viewing this thread

Back
Top Bottom