- Joined
- Mar 6, 2012
- Messages
- 1
- Reaction score
- 0
Hi people, I am new to this so i will try and make sure i cover all of the information needed and try not to write too much.
I am using a calendar control on a form on my databse, I want to be able to click on a date on the calendar and show the different meetings or events which have been scheduled in tblmeetings for that day. I have tried the following code and it says that there is an object missing:-
________________________
Private Sub Calendar2_Dblclick()
Dim dbs As Database
Dim dtCriteria1 As String
Dim meeting As Recordset
Set dbs = CurrentDb
Set meeting = dbs.OpenRecordset("QryMeetingDunc")
Set dtCriteria1 = StartDateCalendar.Value
If meeting![Date] = dtCriteria1 Then
MsgBox "Meeting today"
Else: MsgBox "No Meeting today"
End If
meeting.Close
End Sub
_____________________________________
I have tried several different versions of this and I stil cant get it to work.
Thanks in advance if anyone can help me
cheers
Please Help
I am using a calendar control on a form on my databse, I want to be able to click on a date on the calendar and show the different meetings or events which have been scheduled in tblmeetings for that day. I have tried the following code and it says that there is an object missing:-
________________________
Private Sub Calendar2_Dblclick()
Dim dbs As Database
Dim dtCriteria1 As String
Dim meeting As Recordset
Set dbs = CurrentDb
Set meeting = dbs.OpenRecordset("QryMeetingDunc")
Set dtCriteria1 = StartDateCalendar.Value
If meeting![Date] = dtCriteria1 Then
MsgBox "Meeting today"
Else: MsgBox "No Meeting today"
End If
meeting.Close
End Sub
_____________________________________
I have tried several different versions of this and I stil cant get it to work.
Thanks in advance if anyone can help me
cheers
Please Help