A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Report showing #Error on a valid SQL View



 
 
Thread Tools Display Modes
  #1  
Old May 7th, 2010, 08:54 PM posted to microsoft.public.access.reports
Ray C
external usenet poster
 
Posts: 215
Default Report showing #Error on a valid SQL View

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 !

  #2  
Old May 7th, 2010, 09:49 PM posted to microsoft.public.access.reports
John Spencer
external usenet poster
 
Posts: 7,815
Default Report showing #Error on a valid SQL View

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

Ray C wrote:
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 !

  #3  
Old May 7th, 2010, 09:50 PM posted to microsoft.public.access.reports
John Spencer
external usenet poster
 
Posts: 7,815
Default Report showing #Error on a valid SQL View

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

Ray C wrote:
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 !

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:14 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.