Hi all
I've got a subsubform called newsubCRBSI which sits on the subform called subfrmlines.
Mousedown on newsubCRBSI.CRBSIDate nicely brings up a calendar on subfrmlines as below...
-
Private Sub CRBSIDate_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
-
Me.Parent!Calendar4.Visible = True
-
Me.Parent!Calendar4.SetFocus
-
If Not IsNull(CRBSIDate) Then
-
Me.Parent!Calendar4.Value = CRBSIDate.Value
-
Else
-
Me.Parent!Calendar4.Value = Date
-
-
End If
-
End Sub
but when it comes time for the Calendar value to get transferred back down to CRBSIDate it crashes with "Runtime error 2465 …”can’t find the field ‘newsubCRBSI’ referred to in your expression""
Problems are at Line 11 below
The code looks right to me:
- Private Sub Calendar4_Click()
-
If Calendar4.Value > Date Then
-
MsgBox "Culture Date cannot be in the future."
-
Calendar4.SetFocus
-
Calendar4.Value = Date
-
ElseIf Calendar4.Value < Insertion Then
-
Call MsgBox("Culture Date cannot Precede Line Insertion Date", , "NICU Line Infection Database")
-
Calendar4.SetFocus
-
Calendar4.Value = Insertion
-
Else
-
Me!newsubCRBSI.Form!CRBSIDate.Value = Calendar4.Value
-
Me!newsubCRBSI.Form!CRBSIDate.SetFocus
-
Calendar4.Visible = False
-
End If
-
End Sub
Help!
Michael