Double Click - A calender shows up

KYLE_DELUCA

Registered User.
Local time
Today, 23:47
Joined
Mar 20, 2003
Messages
11
I have seen in other databases, but have never had a chance to look into it, where you can "Double click" on a text box and a "Calender" would show up, so you could select a date instead of typing it in.

Does anyone have the knowledge to share with me?

Thanks

Kyle Deluca
 
you can either have a calender control hidden on your form
or make up a form with a calender control in it.

then in the on doubleclick or click event either open the form
or make the calender visible

use the calenders on click event to set the date value you
select

eg, me![txtboxname]=me![calendername].value
 
Access ships with a calendar control but its installation is not automatic. If you don't see it in the list of ActiveX controls, you'll need to install it from the installation CD.
 
Assuming you have the calendar installed you can eneter the following on any textbox double click event: (assuming your calendar form is called frmCalendar)

DoCmd.OpenForm "frmCalendar", , , , , , Screen.ActiveControl.Value

Then on the calendar double click event (Found in the Vb window)

Private Sub Calendar_DblClick()
On Error Resume Next

Dim datRet As Date

datRet = Me.Calendar

DoCmd.Close acForm, Me.Name

Screen.ActiveControl = datRet

End Sub

This assumes the calendar is called Calendar on the form frmCalendar.

I'm starting to confues myself

I'll try to find an example
BRB
Dave
 

Users who are viewing this thread

Back
Top Bottom