AFAIK it can't be done with Microsoft's standard Calendar or DTPicker.
Perhaps there are third party calendars out there capable of doing this(?).
What you can do, though, with Microssoft's standard controls, is either use
two in order to have a From and a To date for your criteria, or use a single
one, unbound, just for date selection, so feed two textboxes on a form to
serve as the From and To boundaries. A few lines of code would do it. Here's
an example, assuming:
* two text controls clled txtDateFm and txtDateTo
* an activeX calendar called ActiveXCtl1
* a Public variable called "caller: to store the name of the textbox calling
the control
The calendar control is hidden (Visible = No) in the form's design, and is
positioned right under the calling textbox and made visible by the txtbox's
double click (or click, enter, got focus... event):
Option Compare Database
Public caller As String
Private Sub ActiveXCtl1_Click()
Me.Controls(caller) = Me.ActiveXCtl1
Me.Controls(caller).SetFocus
Me.ActiveXCtl1.Visible = False
End Sub
Private Sub txtDateFm_Click()
caller = Me.ActiveControl.Name
Me.ActiveXCtl1 = Date
Me.ActiveXCtl1.Top = Me.txtDateFm.Top + Me.txtDateFm.Height + 15
Me.ActiveXCtl1.Left = Me.txtDateFm.Left
Me.ActiveXCtl1.Visible = True
End Sub
Private Sub txtDateTo_Click()
caller = Me.ActiveControl.Name
Me.ActiveXCtl1 = Date
Me.ActiveXCtl1.Top = Me.txtDateTo.Top + Me.txtDateTo.Height + 15
Me.ActiveXCtl1.Left = Me.txtDateTo.Left
Me.ActiveXCtl1.Visible = True
End Sub
HTH,
Nikos