Microsoft Jet does not recognize...

G

Gina

Hi again...

I hope I'm not wearing out my welcome, but I'm getting
this error message when I try to print one particular
report from my print dialog:

The Microsoft Jet database engine does not
recognize 'Forms![frmPrintReports]![txtBegDate]'as a valid
field name or expression.

The problem is, I open several other reports from the same
dialog box and it works perfectly! Does anyone know why
this happens?

Thanks in advance.
 
M

MacDermott

Is the query behind this report perhaps more complex than behind the others?
Or are you running it at a time when frmPrintReports is not open?

- HTH
Turtle
 
A

Allen Browne

Concatenate the value of the date into the WhereCondition string.

Example:
Dim strWhere As String
If IsDate(Me.txtBegDate) Then
strWhere = "[MyDateField] = " & _
Format(Me.txtBegDate, "\#mm\/dd\/yyyy\#")
End If
DoCmd.OpenReport "MyReport", acViewPreview, , strWhere
 
L

lushuwen

Gina said:
Hi again...

I hope I'm not wearing out my welcome, but I'm getting
this error message when I try to print one particular
report from my print dialog:

The Microsoft Jet database engine does not
recognize 'Forms![frmPrintReports]![txtBegDate]'as a valid
field name or expression.

The problem is, I open several other reports from the same
dialog box and it works perfectly! Does anyone know why
this happens?

Thanks in advance.
 

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

Top