Here is the code:
CODE
'In forms module
Private Sub DateReceived_Click()
OpenCalendar ("DR", Me.DateReceived)
End Sub
Private Sub EventDate_Click()
OpenCalendar ("ED", Me.EventDate)
End Sub
'In it's own module
Global st as String
Public Function OpenCalendar(start As String, d As Date)
Forms!EventEntry!Calendar0.Visible = True
If IsNull(d) Then
Forms!EventEntry!Calander0.Value = Date
Else
Forms!EventEntry!Calander0.Value = d
End If
st = start
End Function