Full Version: Calendar
UtterAccess Forums > Microsoft® Access > Access Forms
alexchang
I was testing activeX Calendar. I established a table with PresentedDate and AcceptanceDate. I build 2 comboxes named after the listed. Then I choose activeX calendar and buld a few lines codes to run the calendar however I got an error message with I pressed "Run Time Error '2424' The expression you entered has a field, control, or property name that Microsoft Access can't find."
When I pressed debug button, it highlighted a line of code: "ocxCalendar.value = cboPresentedDate.value
What does it mean? And how do I resovle this?
alexchang
I also attached the code as well.
Jack Cowley
Be sure that ocxCalendar and cboPresentedDate are the actual names of the controls on your form. I assume the code is in the After Update event of the combo box(es).
th,
Jack
Jack Cowley
If you are trying to select a date in the combo box and have it fill in the calendar then move your code to the After Update event of the combo box. Put dates in the combo box and your code should work.
th,
Jack
Dom DXecutioner
Alternatively you could try a calendar which is ActiveX free at this ua_post
alexchang
Hi! thanks for the reply. I want to click on the mous down button and show the calendar. Thn select month day and year on the calendar and the combobox wil be filled at the same time. Let me attach the URL of the the example I download it earlier. The format is the same but mine doesnt work.
http://www.fontstuff.com/access/acctut09.htm
Thx XyonX, I look into your files.
Best Regards,
Alex
Jack Cowley
There are a lot of ways to skin this cat. Attached is a demo that does what you want and does not require and space on your form....
th,
Jack
alexchang
Thanks, it is Sweet.
Jack Cowley
Here is one more that does not require the Active X Calendar....
Glad you liked the first one...
Jack
alexchang
Got a question Jack... I see you text box named Day1, day2, day3 etc. Then in your double click code, you have "Do open form" then 4 comas and 1, and 2, and 3 etc. If I have a "PresentedDay" as textbox name. Do subsitute 1, and 2, and 3 with " PresentedDay" in the double click code?
Jack Cowley
The 1, 2 etc. is the OpenArgs argument. Take a look at the form "frmCalendar" in design view and look at the code in the "Private Sub Calendar_Click()" event....
You will want to send a 1 or a 2 from your controls on your form and then make changes to the code sited above...
hth,
Jack
alexchang
Also, going into your calendar form event, I see command 1 and command 2 click action code. I understand Command 2 = Close button. Does command 1 represent the clicking of the calendar? Where is the place I put this command click code at? On the calendar click event?
Jack Cowley
Command 1 Click is old code that I forgot to delete.... Sorry about that. Also, the Calendar control does no have a On Click event so you have to write on, as I have done in the demo...
ack
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.