E
Eric
Hello everyone.
I have a report made that has a control source as =FindQTR
([Reports]![FSR Report by Plant]![Date Recieved]) which
calls this Report module:
Function FindQtr(QtrDate As Date) As String
If QtrDate >= "1/1/" & Right(Me.Date_Recieved, 4) And
QtrDate <= "6/31/" & Right(Me.Date_Recieved, 4) Then
Me.txtQtr.Value = "1Q" & Right(Me.Date_Recieved, 2)
ElseIf QtrDate >= "4/1/" & Right(Me.Date_Recieved, 4) And
QtrDate <= "6/30/" & Right(Me.Date_Recieved, 4) Then
Me.txtQtr.Value = "2Q" & Right(Me.Date_Recieved, 2)
ElseIf QtrDate >= "7/1/" & Right(Me.Date_Recieved, 4) And
QtrDate <= "9/30/" & Right(Me.Date_Recieved, 4) Then
Me.txtQtr.Value = "3Q" & Right(Me.Date_Recieved, 2)
ElseIf QtrDate >= "10/1/" & Right(Me.Date_Recieved, 4) And
QtrDate <= "12/31/" & Right(Me.Date_Recieved, 4) Then
Me.txtQtr.Value = "4Q" & Right(Me.Date_Recieved, 2)
End If
End Function
....but I keep getting a error stating Type Mismatch 13
with the report showing #Error in the cell I am trying to
refrence. What am I doing wrong?
I have a report made that has a control source as =FindQTR
([Reports]![FSR Report by Plant]![Date Recieved]) which
calls this Report module:
Function FindQtr(QtrDate As Date) As String
If QtrDate >= "1/1/" & Right(Me.Date_Recieved, 4) And
QtrDate <= "6/31/" & Right(Me.Date_Recieved, 4) Then
Me.txtQtr.Value = "1Q" & Right(Me.Date_Recieved, 2)
ElseIf QtrDate >= "4/1/" & Right(Me.Date_Recieved, 4) And
QtrDate <= "6/30/" & Right(Me.Date_Recieved, 4) Then
Me.txtQtr.Value = "2Q" & Right(Me.Date_Recieved, 2)
ElseIf QtrDate >= "7/1/" & Right(Me.Date_Recieved, 4) And
QtrDate <= "9/30/" & Right(Me.Date_Recieved, 4) Then
Me.txtQtr.Value = "3Q" & Right(Me.Date_Recieved, 2)
ElseIf QtrDate >= "10/1/" & Right(Me.Date_Recieved, 4) And
QtrDate <= "12/31/" & Right(Me.Date_Recieved, 4) Then
Me.txtQtr.Value = "4Q" & Right(Me.Date_Recieved, 2)
End If
End Function
....but I keep getting a error stating Type Mismatch 13
with the report showing #Error in the cell I am trying to
refrence. What am I doing wrong?