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!

Choose date from Calendar

Status
Not open for further replies.

nfpk

Programmer
Aug 15, 2002
74
SE
Hi!
Is it possible to choose a date from a Calendar in an Access form? And in that case, how ...?
 
Yes this is possible. On your tool bar under more controls button, there is a Calendar control in the list. Add this control to a new form. On the form that has your date field, create a control button that will open the calendar form. On the calendar Updated event, add this code

Code:
__________________________

Private Sub ActiveXCtl0_Updated(Code As Integer)

Dim Frm as Form
Dim TxtStr As TextBox

Set Frm = Forms!Your_Form_Name_Here
Set TxtStr = Frm.Your_Text_Box_Name_Here
TxtStr = Me.CalendarName.Value

End Sub
___________________________

This will set your text box to the value on the calendar everytime the user changes the date. The calendar opens to the current date by default. Hope this helps

Thanks
GTLoco

 
have a look at thread181-511056 it might give you a few ideas

Hope this helps
Hymn
 
Hi!
I´ve been busy with other stuff, now I´m tryin again with the calendar control 8.0
But as fast as I draw the rectangle Access compains withh an error telling me that Access is shutting down and you know "Do you want to sen a rapport to Microsoft...."
I´ve heard that there is some kind of fix for this problem, does anyone know?
 
Try this thread:

Thread702-563868

I use this calendar at work and it is AWESOME!!!

Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top