Solved

Calendar in SubForm

Posted on 2011-03-01
12
613 Views
Last Modified: 2012-05-11
I am trying to implement a calendar via a subform. I found this demo on the msdn. However I don't want the text box to be updated when the Month and Year increment and decrement buttons are pressed. I only want to update the text box when the date is actually clicked. I am not sure what I need to modify to fix this.
CalendarDemo.zip
0
Comment
Question by:threeieng
  • 6
  • 4
  • 2
12 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35008201
0
 

Author Comment

by:threeieng
ID: 35008335
This will be used in Access 2010 so it cannot use the Calendar Control since its not supported in 2010.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35009599
it really helps when you give all the information in the original post.
saves time and effort
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Author Comment

by:threeieng
ID: 35010046
Sorry for leaving that out.  I asked what needs to be modified in the uploaded database so I didn't think Access version was important.
0
 
LVL 10

Expert Comment

by:conagraman
ID: 35018851
threeieng-

just delete the arrow buttons on the formCalendar
0
 
LVL 10

Expert Comment

by:conagraman
ID: 35018990
here is your database. i did a couple things to it

like i said before i deleted the arrows but i also got rid of the list box and set the properties of the date textbox to:
enabled =false
locked = true
i did this to keep the default calendar from poping up

in the calendar form i set the key down event to
keycode = 0
this way the user will have to click on the date


CalendarDemo.mdb
0
 
LVL 10

Expert Comment

by:conagraman
ID: 35019006
i guess thats what you want to do?
0
 

Author Comment

by:threeieng
ID: 35023457
The user will still need to ability to increment or decrement the month and year though.
0
 
LVL 10

Expert Comment

by:conagraman
ID: 35026921
threeieng

the answer to your question is your current calendar in your uploaded database can not be modified to do what you want it to do.

what i have found is that you will need to use a different calendar. this calendar will not function the way you want it to.  you would need to be able to access the onclick event of the form frmCalendar. if you put code into the onclick event of your current calendar it wont get fired because every control already has an onclick event.

keep in mind when you click in your birthday textbox the little built in calendar will pop up and acts like you have described. just giving you an option.
im sure there are other calendars out there that will work.
0
 
LVL 10

Accepted Solution

by:
conagraman earned 500 total points
ID: 35027125
wait i take that all back : ) i got it


ok i added a global integer variable "wasClicked"
 in the handleselected function i set that variable "wasClicked" to =1
last in the calendarForm_DateChanged sub i put an if then statement.


yea!...


CalendarDemo.mdb
0
 

Author Closing Comment

by:threeieng
ID: 35027880
Thank you very much for going the extra mile conagraman!!
0
 
LVL 10

Expert Comment

by:conagraman
ID: 35028122
: )
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question