Solved

Calendar in SubForm

Posted on 2011-03-01
12
595 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 119

Expert Comment

by:Rey Obrero
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 119

Expert Comment

by:Rey Obrero
ID: 35009599
it really helps when you give all the information in the original post.
saves time and effort
0
 

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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
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…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now