Solved

Calendar in SubForm

Posted on 2011-03-01
12
625 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

691 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