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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting MSCAL.Calendar.7 date value

Status
Not open for further replies.

Chad1984

Technical User
Joined
Jul 10, 2007
Messages
35
Location
US
I'm using an MSCAL.Calendar.7 class object on a form that allows the user to select a report name, options, and the start and ending dates the period should cover. The user then clicks a button and the proper report fills out. The problem I'm having is that I can have the objects pop up with a given date (by editing the property), but that's static- I want them to at least show up set to the current date or something.

I realize this is an insanely stupid question, but for some reason it's not working for me- how can I set the object to a date dynamically?
 
You can't set its Value property to Date() in the Load event procedure of the form ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Duh! I thought it would be something really easy. I was trying to set it to a specific value- I rearranged the numbers, put them in single quotes, in parentheses, tried every combination, I could think of for an hour, with no result.
StartDate = Date
(where StartDate is the name of the control and Date is a function that returns the current date) worked like a charm... and then it occured to me to try single quotes for specific values, as in:
StartDate = "8/12/07"
Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top