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 doesn't show current date. 1

Status
Not open for further replies.

iwanalearn

Technical User
Sep 21, 2001
22
US
I have a calendar (MSCAL.Calendar.7) in a MS Access 2000 form that is used to fill in a field. I can get everything to work except that it doesn't show the current date. It shows the date that was set in properties. Im using vb 6.0

Me!datecalendar.Visible = Me!tgldate
If Me!tgldate Then

I think the problem is here but can't figure out the right combination. It works in Access 97 using the following
If IsNothing

If IsEmpty(Me!date) Then
Me!datecalendar.Year = Year(date)
Me!datecalendar.Month = Month(date)
Me!datecalendar.Value = date
DoCmd.RepaintObject
End If
End If


End Sub

Any Ideas?
Thanks for the help


Any ideas
 
Try this simple little code in form_load event.

Place the calendar control on a blank form. Rename the calender control (i.e ctlCalendar).

ctlCalendar.Value = Now


P.S. Let me know if this solves your problem.

reidfl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top