Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calendar Help

Status
Not open for further replies.

docslack33

Programmer
Nov 5, 2001
7
US
I am trying to make a calendar that when you input a 4 digit year (yyyy) into a text box, that a calendar will come up showing January of that year...Now, I have thrown in MS Calendar Control 8.0 onto Form2, and when you hit a command button it goes from form1 to form2, showing the Calendar. Now the problem I am having is trying to manipulate Calendar1.Value according to what's in the text box. Thank you for any suggestions...
David
 
I'm not quite sure if I have you understood correctly. But from my understanding of this you just have to set the calendars value to the 1/1/yyyy to display the calendar for January of that year so when you get the year from the text box append it to the string "1/1/" and then pass this in as your value. Sorry if thats not what your looking for. Maybe you could elaborate a bit more.
 
That's exactly what I intend to do! But the other problem is this...I think I know how to change the format the Calendar value(but would like reassurance), but how would I get the text box to correspond with the 1/1/yyyy format of the calendar?
 
I think the only way to do that is a load of validation procedures to make sure its in the right format or you can use the IsDate() function to validate. Alternatively instead of using a text box and giving the user the freedom to type in the year fill a combo box with the list of years and have them selectfrom the combo box.
 
Is there a way to do this with a text box? I am going to try it with a combo box, but I still would like to know how to do this with a text box...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top