Forum Discussion
nicoleethier
May 21, 2026Copper Contributor
Access selecting specific date on a calendar
I'm pulling my hair out because everything I've found through my research says my VBA code should work, but it doesn't! Here's the story. I have a calendar (form) that shows events going on for each...
GustavBrock
May 21, 2026MVP
You are making it way too complicated. Try:
Private Sub lblTue3_Click()
Dim SelectDate As Date
SelectDate = DateValue(Me!txtSelectDate.Value)
DoCmd.OpenForm "frmThatContainsMyData", acNormal, , "[DateOnFormUsedForFilter] = #" & Format(SelectDate, "yyyy\/mm\/dd") & "#", , acDialog
End Sub
' or even:
Private Sub lblTue3_Click()
DoCmd.OpenForm "frmThatContainsMyData", acNormal, , "[DateOnFormUsedForFilter] = #" & Me!txtSelectDate.Value & "#", , acDialog
End Sub