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

Date field question...

Status
Not open for further replies.

JZII

Technical User
Jan 26, 2001
37
0
0
SE
In my form I have a datefield where user write any date they want. for now the do it manualy.
My question is...

Can I get the same function thats availible in outlooks calendar... when creating a new appointment, by clicking the dropdown menu, a small calendar appears where you can choose date and then it appears in the date field...

Is this possible in access with activex or something else...
anything would be better then doing it manualy...

Thanks... JZII
 
Yes, you can by using the Active X Calendar Controls. What I've done in the past is have a Text Box which will hold the date field. And on the form have a calendar control (an actual calendar) that is not visible. I make the user double click in the text box,and on that event I make the calendar visible. I have them select a date from the calendar and have it assigned back to the text box. Hope this isn't too confusing but it seems like it does what your are looking to do.

Phil
 
Cal Controls can be found under More Controls on the Toolbox Toolbar
 
OK... I know what you mean, but I don´t know some bits...
I have the calcontrol invinsible in the form, so now I need the code to make the calcontrol appear on event dbclick.
And how do I make the date appear in the datefield when I click on the calendar?


Thanks... JZII
 
On the double click event of the Datefield.txt just CalControlName.visible = true

Then input this code on the form where the cal.control and the date field are. This will populate the Datefield.txt with the CalControlName value when you double click on a date on the calender control. Give it a shot.


Private Sub CalControlName_DblClick()
Dim actcontrol As Object
Set actcontrol = Datefield.txt
actcontrol.SetFocus
actcontrol = CalControlName.Value
End Sub

Phil
 
Nice...I´t works...

Thanks!!! JZII
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top