Calendar Control 9.0

  • Thread starter Thread starter Chaster
  • Start date Start date
C

Chaster

I am trying to set field to the date that I select from this control.

I have tried to set the On Updated Property to
me.[ExpectedArrivalDate] = me.ActiveXCtl343 'and this does nothing

I have also tried to set the GotFocus Property to
me.[ExpectedArrivalDate] = me.ActiveXCtl343

This does put in Today's date into the field [ExpectedArrivalDate] but I
want it to put in the date that I click on in the calendar control.

I'm sure it's simple and apparently so am I.

any help is appreciated.
 
Put this in the AfterUpdate event of the calendar control:

me![ExpectedArrivalDate] = me!ActiveXCtl343.Value


--
PC Datasheet
A Resource for Access, Excel and Word Applications
(e-mail address removed)
www.pcdatasheet.com

· Design and basic development for new applications
· Additions, Modifications and "Fixes" for existing applications
· Mentoring for do-it-yourselfers who want guidance
· Complete application design and development
· Applications Using Palm Pilot To Collect Data And
Synchronize The Data Back To Access Or Excel
 
Also, if you are going to use a calendar in multiple forms, I have a demo using one calendar control
on one form, callable from any form/any textbox.

www.byerley.net/AccessCalDemo.Zip

You should be able to use the code from the demo to get where you want to go...
 
I tried using this code but get a
The control is too large for this location error.

When I go into Dbug it stops and highlights
..Top = 0

If I push end the cal displays but nothing happens when I click on a date.

Any ideas what might be going on?

Thanks
MikeB said:
Also, if you are going to use a calendar in multiple forms, I have a demo using one calendar control
on one form, callable from any form/any textbox.

www.byerley.net/AccessCalDemo.Zip

You should be able to use the code from the demo to get where you want to go...


I am trying to set field to the date that I select from this control.

I have tried to set the On Updated Property to
me.[ExpectedArrivalDate] = me.ActiveXCtl343 'and this does nothing

I have also tried to set the GotFocus Property to
me.[ExpectedArrivalDate] = me.ActiveXCtl343

This does put in Today's date into the field [ExpectedArrivalDate] but I
want it to put in the date that I click on in the calendar control.

I'm sure it's simple and apparently so am I.

any help is appreciated.
 
I am running the example code. I thought it best to see how it operates
before trying to incorporate into my code.

Win 2k Pro at 1024x768 Large Fonts

I ran this by opening up with winzip. I will try saving to disk and retry.

Thanks for the direction.

Chuck

MikeB said:
Are you just running the example DB or have you copied code to your own?

The line of code is the first line of code that sets the calendar control to fit the inside
dimensions of the form that contains it.

In the previous lines above where the error occurred, the form was set to 3600 x 3600 pixels [inside
dimensions] and then the calendar is set to Top = 0 and left = 0 and height and width = 3600, the
same as the inside dimensions of the form.

The Demo File is AC2000 It runs without error on my NT4 box AC2000 [scr res 800x600] and XP box
AC2002 [scr res 1024x768] and W98 Box AC2000 [scr res 1024x768].




I tried using this code but get a
The control is too large for this location error.

When I go into Dbug it stops and highlights
.Top = 0

If I push end the cal displays but nothing happens when I click on a date.

Any ideas what might be going on?

Thanks
MikeB said:
Also, if you are going to use a calendar in multiple forms, I have a
demo
using one calendar control
on one form, callable from any form/any textbox.

www.byerley.net/AccessCalDemo.Zip

You should be able to use the code from the demo to get where you want
to
go...
I am trying to set field to the date that I select from this control ..

I have tried to set the On Updated Property to
me.[ExpectedArrivalDate] = me.ActiveXCtl343 'and this does nothing

I have also tried to set the GotFocus Property to
me.[ExpectedArrivalDate] = me.ActiveXCtl343

This does put in Today's date into the field [ExpectedArrivalDate] but I
want it to put in the date that I click on in the calendar control.

I'm sure it's simple and apparently so am I.

any help is appreciated.
 
Problem is wtih Large fonts installed. Works perfect with small fonts
installed.

Problem is with having old eyes I guess.

Thanks
MikeB said:
Are you just running the example DB or have you copied code to your own?

The line of code is the first line of code that sets the calendar control to fit the inside
dimensions of the form that contains it.

In the previous lines above where the error occurred, the form was set to 3600 x 3600 pixels [inside
dimensions] and then the calendar is set to Top = 0 and left = 0 and height and width = 3600, the
same as the inside dimensions of the form.

The Demo File is AC2000 It runs without error on my NT4 box AC2000 [scr res 800x600] and XP box
AC2002 [scr res 1024x768] and W98 Box AC2000 [scr res 1024x768].




I tried using this code but get a
The control is too large for this location error.

When I go into Dbug it stops and highlights
.Top = 0

If I push end the cal displays but nothing happens when I click on a date.

Any ideas what might be going on?

Thanks
MikeB said:
Also, if you are going to use a calendar in multiple forms, I have a
demo
using one calendar control
on one form, callable from any form/any textbox.

www.byerley.net/AccessCalDemo.Zip

You should be able to use the code from the demo to get where you want
to
go...
I am trying to set field to the date that I select from this control.

I have tried to set the On Updated Property to
me.[ExpectedArrivalDate] = me.ActiveXCtl343 'and this does nothing

I have also tried to set the GotFocus Property to
me.[ExpectedArrivalDate] = me.ActiveXCtl343

This does put in Today's date into the field [ExpectedArrivalDate] but I
want it to put in the date that I click on in the calendar control.

I'm sure it's simple and apparently so am I.

any help is appreciated.
 
Back
Top