Help.
I am getting this error after enetering new samples in to the databse. We
use an older version of Access (2000). I will not let me open reports or
sample lists in the months these sample are due to be tested. However, I can
open the input data area and these samples are listed.
Private Sub bRptCRTTest_Click()
If Len(TestDate) <> 7 Or IsNull(TestDate) Then
Call GetTest
Else
DoCmd.OpenReport "rCRTMonthTest", acPreview
End If
End Sub
What error number is it?
What is the error message?
Which line is highlighted?
The code is equivalent to this:
If Len(Me.TestDate) = 7 Then
DoCmd.OpenReport "rCRTMonthTest", acViewPreviewPreview
Else
Call GetTest
End If

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> I am getting this error after enetering new samples in to the databse. We
> use an older version of Access (2000). I will not let me open reports or
[quoted text clipped - 9 lines]
> End If
> End Sub
ranvil - 28 Feb 2007 14:52 GMT
the error number is 3071
The highlighted line is:
DoCmd.OpenReport "rCRTMonthTest", acViewPreviewPreview
It states:
The expression is typed incorrectly or is too complex to be evaluated.
Is is typed correctly, don't know why it states that.
> What error number is it?
> What is the error message?
[quoted text clipped - 21 lines]
> > End If
> > End Sub
Allen Browne - 28 Feb 2007 15:10 GMT
Sorry: too many previews:
DoCmd.OpenReport "rCRTMonthTest", acViewPreview
Make sure there is nothing else on the same line (especially not an
underscore at the end.)
Make sure the code compiles (Compile on Debug menu.)

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> the error number is 3071
> The highlighted line is:
[quoted text clipped - 32 lines]
>> > End If
>> > End Sub