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

Calendar object

Status
Not open for further replies.

davidd31415

Programmer
Jan 25, 2006
154
US
I am having a few problems with a Calendar 9.0 object in MS Access. I would like the date selected on the Calendar to appear in a text box. I am able to do this with textbox.value = Calendar.Object but if I select the current date the value in the text box is 12:00 AM. If I select the current date a second time, the value is correct. I don't have this problem with other dates. Any ideas why this is happening?

I would also like to have the calendar default to the current date but I have not been able to do this yet either. I've read a few threads but plan to work more on it next week- I'll post back if I figure it out.

Thanks,

David
 


Hi,

"... value in the text box is 12:00 AM..."

ZERO.

In the textbox Enter Event...
Code:
Private Sub TextBox2_Enter()
    TextBox2.Text = Calendar1.Value
End Sub
My Calendar Object defaults to today's date.

Or in the Calendar click event...
Code:
Private Sub Calendar1_Click()
    TextBox1.Text = Calendar1.Value
End Sub


Skip,

[glasses] [red][/red]
[tongue]
 
Using the .Value property in the Click event was the first thing I tried- it was always null.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top