Calender record call-up

  • Thread starter Thread starter A Jones
  • Start date Start date
A

A Jones

How can i select a date on the calender control and call
up the record for that date?
any help or alternatives greatly appreciated.
 
Put the following code in the OnClick event oif a command button:

Dim Rst As DAO.Recordset
Set Rst = Me.Recordsetclone
Rst.FindFirst "[NameOfDateField] = #" & Me!NameOfCalendarControl.Value & "#"
If Not Rst.NoMatch Then
Me.BookMark = Rst.Bookmark
Else
MsgBox "There Is No Record For The Date You Selected"
End If
Rst.Close
Set Rst = Nothing

Note: Code assumes the calendar is on your form
 
Back
Top