Report showing #Error on a valid SQL View

R

Ray C

I have an Access app with an SQL Server backend.
One report is based on a VIEW. When I run the view alone all the data is
visible. But when I run the report, I get #Error on one field. The field is
numeric. However, the RecordSource property of the textbox is:

[MyNumericFieldFromSQLView]/32

What's strange is that when I remove the division by 32, the #Error
disappears.
What I need to do in the report is divide the value from the view by 32. I
cannot modify the view because it is not an option.

Any help? Thanks !
 
J

John Spencer

It is possible that the field is a text field that is displaying number data.

Try the following expression and see what happens.

IIF(IsNumeric([MyNumericFieldFromSQLView]),[MyNumericFieldFromSQLView]/32,Null)

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
J

John Spencer

Also, make sure the control on the report is not named
MyNumericFieldFromSQLView

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 

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