Run Time Error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
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.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top