473,791 Members | 3,211 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

expression is typed incorrectly

Good morning, I need a little help, I keep getting this error when I run this
report. I have narrowed it down to the query (sql view) listed below. the
error is: "This expression is typed incorrectly, or it is too complex to be
evaluated"

SELECT ActiveBranch.[Branch Name], -Sum([MthEnd]/[MonthClosingUni t]) AS
[AncillaryFee$MT D], -Sum([YTD]/[YTDClosingUnit]) AS [AncillaryFee$YT D], -Sum(
[MthEnd]/[MonthClosingVol ume])*10000 AS AncillaryFeeBps MTD, -Sum([YTD]/
[YTDClosingVolum e])*10000 AS AncillaryFeeBps YTD, Sum(-[MthEnd]) AS
TotalExpMthly, Sum(-[YTD]) AS TotalExpYTD
FROM (tblACPLTrialBa lanceHistory INNER JOIN ActiveBranch ON
tblACPLTrialBal anceHistory.Cos tCenter = ActiveBranch.Co stCenter) INNER JOIN
tblGENRClosingS ummary ON ActiveBranch.Co stCenter = tblGENRClosingS ummary.
CostCenter
WHERE (((tblACPLTrial BalanceHistory. ActgPeriod) Between [Forms]!
[frmACLSRptsMTDY TD]![MthBegDt] And [Forms]![frmACLSRptsMTDY TD]![MthEndDt])
AND ((tblACPLTrialB alanceHistory.[GLAcct#])="300610" Or
(tblACPLTrialBa lanceHistory.[GLAcct#])="300611" Or
(tblACPLTrialBa lanceHistory.[GLAcct#])="300802" Or
(tblACPLTrialBa lanceHistory.[GLAcct#])="300899" Or
(tblACPLTrialBa lanceHistory.[GLAcct#])="300999" Or
(tblACPLTrialBa lanceHistory.[GLAcct#])="300902"))
GROUP BY ActiveBranch.[Branch Name];
Any help would be greatly appreciated

Christine

--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200604/1
Apr 28 '06
14 5003
cvollberg via AccessMonster.c om wrote:
Your awesome, it worked, thank you so much


Hurray, someone beside my mom thinks so! 8)

Seriously, you should really investigate what the query/sql is behind
the report you mentioned. It does sound as if it's very different and
if the two results (the one via query and the one via report) are
supposed to be the same, then you might have some trouble.

My guess is the recordsource for the report might give individual
details which are added together on report section headers, giveing the
same effect as the original query you posted. The original developer
might have had some version of the iif() in the individual report
controls that do the fractions in the section headers.

That's just a guess, though.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Apr 28 '06 #11
Tim,

Ok I have solved almost all of this reports problem but one. I have this one
subreport that is still giving me the error, I think it is because I have one
record in the result set giving me an #error in the VOSBps field and I have
not been able to figure out how to get rid of it.

This is the expression I use: VOSBps: ZeroVal2(Sum([VOS$])/Sum([LoanAmt])
*10000), now it just so happens that the VOS$ and the LoanAmt are 0, is this
creating the error and if so how do I fix it?

any help is greatly appreciated.

Christine

Tim Marshall wrote:
Your awesome, it worked, thank you so much


Hurray, someone beside my mom thinks so! 8)

Seriously, you should really investigate what the query/sql is behind
the report you mentioned. It does sound as if it's very different and
if the two results (the one via query and the one via report) are
supposed to be the same, then you might have some trouble.

My guess is the recordsource for the report might give individual
details which are added together on report section headers, giveing the
same effect as the original query you posted. The original developer
might have had some version of the iif() in the individual report
controls that do the fractions in the section headers.

That's just a guess, though.


--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200605/1
May 1 '06 #12
Forgot to give what the report is doing with it: all it is doing is taking
the totals from the query and doing the following: =Sum([SumOfVOS$])/Sum(
[SumOfLoanAmt])*10000

cvollberg wrote:
Tim,

Ok I have solved almost all of this reports problem but one. I have this one
subreport that is still giving me the error, I think it is because I have one
record in the result set giving me an #error in the VOSBps field and I have
not been able to figure out how to get rid of it.

This is the expression I use: VOSBps: ZeroVal2(Sum([VOS$])/Sum([LoanAmt])
*10000), now it just so happens that the VOS$ and the LoanAmt are 0, is this
creating the error and if so how do I fix it?

any help is greatly appreciated.

Christine
Your awesome, it worked, thank you so much

[quoted text clipped - 12 lines]

That's just a guess, though.


--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200605/1
May 1 '06 #13
cvollberg via AccessMonster.c om wrote:
This is the expression I use: VOSBps: ZeroVal2(Sum([VOS$])/Sum([LoanAmt])
*10000), now it just so happens that the VOS$ and the LoanAmt are 0, is this
creating the error and if so how do I fix it?


ZeroVal2 must be a function of some sort, probably in a standard module.
Regardless, it's not causing the problem (or all of the problem), it's
the zeros in loanamt. And only when all values for the group value are
zero.

This is totally air code, but try something similar to the iif()
approach you did previously (watch wrap):

VOSBps: iif(Sum([LoanAmt]) = 0, 0, ZeroVal2(Sum([VOS$])/Sum([LoanAmt])
*10000))
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
May 2 '06 #14
Thanks Tim,

worked great, I was trying to use the same idea early just could not get it
to work right. Thanks again.

christine

Tim Marshall wrote:
This is the expression I use: VOSBps: ZeroVal2(Sum([VOS$])/Sum([LoanAmt])
*10000), now it just so happens that the VOS$ and the LoanAmt are 0, is this
creating the error and if so how do I fix it?


ZeroVal2 must be a function of some sort, probably in a standard module.
Regardless, it's not causing the problem (or all of the problem), it's
the zeros in loanamt. And only when all values for the group value are
zero.

This is totally air code, but try something similar to the iif()
approach you did previously (watch wrap):

VOSBps: iif(Sum([LoanAmt]) = 0, 0, ZeroVal2(Sum([VOS$])/Sum([LoanAmt])
*10000))


--
Message posted via http://www.accessmonster.com
May 2 '06 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

39
7890
by: | last post by:
I am trying to run the following agregate function in a parameterized query on Access2000: Min(.*sqr(./.)/) The query saved OK, but an attempt to run it results in the message: The expression is typed incorrectly or it is too complex to be evaluated If the sintax correct? Perhaps it is, otherwise it would not save. What can be done about it?
1
7983
by: Terencetrent | last post by:
I am trying to format a query expression drawn from a dialog box as percent. The original statement to get the value for the query is as follows: New%markup: !! The dialog box looks the values up from a table called NewMarkup. It appears in the dialog box with a percent format. However, when I try to call that value in my query it shows it as a decimal.
3
3304
by: MLH | last post by:
Am repeating question with different subject heading, perhaps stating more clearly my problem... I have an A97 query (qryVehiclesNowners2) that has a table field in it named . Depending on the selections made in a number of criteria choices on a form, a field on the form will have string values in it like... Between #12/1/2004# And #12/31/2004# - or - >= #6/10/2005# - or -
1
3678
by: Andrew | last post by:
How can I create a property or function for a typed datasets column? By this I need to add a new column (element) to the table or override an existing column. For instance I have an Invoice table that needs to have a Status property. This status property has to read the other elements in the table to determine what the status is and return a string. I know that I can enter this in the expression fields, but as the expressions become more...
6
2293
by: Ludwig | last post by:
Hi, i'm using the regular expression \b\w to find the beginning of a word, in my C# application. If the word is 'public', for example, it works. However, if the word is '<public', it does not work: it seems that < is not a valid character, so the beginning of the word starts at theletter 'p' instead of '<'. Because I'm not an expert in regular expressions, maybe someone of you guys can help me? I need the correct regex to find the...
9
2140
by: jessicaeatworld | last post by:
Hi, I'm using Access 2003 on Windows XP. My Error: This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables. I'm guessing that one of these calcs is the problem: (/)*31 AS , (/)*31 AS , (/)*31 AS , / AS
4
1688
by: cmartin1986 | last post by:
I am trying to write a sql query to return a count of records from a user defined supplier in weekly buckets going back from a user defined date. I get an error saying "This expression is typed incorrectly or it is too complex to be evaluated...." When I orginally wrote this it would simply start from Date() and go back weekly and still had a user defined supplier. What i did was add a combo box to my "front" form for a user input date, at...
1
5028
by: Coll | last post by:
I'm receiving this message when running a query... This expression is typed incorrectly or is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables. Here's the background. I have a query. I've figured out through cutting and pasting which field is the culprit. So I have a field with the following info...
2
1324
by: sarahms2201974 | last post by:
Hi, I'm attempting to create a database that holds a simple typing test and I'm having some trouble setting it up. I've created a table that holds 5 test samples. The thought is when someone takes the test they will be given a printout of one of the five samples. They will enter the test sample # in the test form and then complete the test by typing what's on their printout. I need to figure out a way to compare what's typed in a...
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9512
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10201
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9987
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6770
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5424
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5552
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4100
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2910
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.