Calender Control easy question to hard questions

R

ryan.fitzpatrick3

I'm relatively new to Access, and I have a question about Calender
control.

I know how to place the calender into a form, but how do I put the
date I select into a textbox? I've seen people write about the on
click or on double click event on the calender, but I don't see those
features in the calenders properties. Is there some code I can have
that will simply put the date I select into that textbox? That was the
easy question.

Harder question, what I would like to do is, I'm making a form where
essentially it would be a schedule timer, the person would enter in
first name, last name, email address, comment field, and date, which
they would select on the calender. When they filled out the selection
they would submit the date were it would be recorded i imagine to a
table. The tricky part would be that the date they select would
generate an email to that person with the comment on that date. Can
this be done? This form could be populated numerous times (since it'll
be used by many different people) for reminders throughout the year.
Can anybody help with this? Does this make sense?

Ryan
 
P

Pat Hartman

The AfterUpdate event doesn't show for the calendar control so I just choose
one of the other events and change its name. Then inside the event, you
just need something like:

Me.mytextbox = Me.calcontrol.value

I generally make the textbox control the calendar to allow the user to type
the date or choose it whichever they prefer. Make sure you set the format
of the control so that Access knows it should hold a date. Then in the
AfterUpdate event of the textbox, you put:

Me.calcontrol.value = Me.mytextbox
 
R

ryan.fitzpatrick3

In the textbox properties I put

Me.calcontrol.value = Me.mytextbox in the control source? I'm sorry I
don't understand what I do. Can you explain it as if you're talking to
a child? lol i'm serious. How do you make the calendar close after you
pick the date?
 
L

Linq Adams via AccessMonster.com

As you've found out, Access handles ActiveX controls in a haphazard fashion,
not displaying all of the associated events in the Properties box.

You can use Pat's method, as long as you know

which events are available for which ActiveX controls

and

which arguments are associated with which events.

An easier way is to simply go into the code editor.

Near the top you'll see two dropdown boxes, (General) and (Declarations)

Select the name of your ActiveX control from the (General) box

Drop down the (Declarations) box and you will see all the events associated
with the control. Choose the desired event.

Linq
 
P

Pat Hartman

Click the builder button (three dots) at the right edge of one of the
calendar control's exposed events. If you get a dialog giving you choices -
choose the code option. That will put you in the code module, positioned to
ender code for the selected event. Change the event name as I mentioned
earlier and enter the suggested code, making sure to change the names to
those of your controls. If your controls have names such as Text182 or
Calendar8, CHANGE THEM by clicking on the control and selecting the
properties dialog. On the "Other" tab is the "Name" property. Make the
name something meaningful but do not use spaces or special characters. Also
avoid using the names of functions or properties such as Name or Date.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top