473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

"Expression typed incorrectly or too complex." on report subform.

45
Hi Guys,

I've hit another frustrating braintwister of a stumbling block.

Please find attached a stripped down version of my project containing a report, a subform and the tables and queries they depend on.

On running the report I get the error message:
"This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numberic expression may contain too many complicated elements. Try Simplifying the expression by assigning parts of the expression to variables."

The message appears once for each record in tblOrderDetails (tables cropped to prevent hundreds). One of the queries contains calculated fields, I have tried entering these expressions as calculated controls on the sub-form with the same result.

I have checked the formatting of the linked fields.

My sleep deprived brain hurts. Building this invoice is the last hurdle before go it goes live. Any pointers would be appreciated.

Jay
Attached Files
File Type: zip Test.zip (145.9 KB, 292 views)
Feb 23 '12 #1

✓ answered by Mihail

I am almost sure that your problem is caused by use the same query as base for the main report and the sub-form (by the way: use a sub-report instead) because this approach create circular reference.

Create a new query for the details and base the sub_form to this query.
DO NOT refer query eqryInvoice in this new query.

10 8173
migi48
28
What happens when you run the query? Did you receive the same error? Or it runs successfully?
Feb 23 '12 #2
JayF
45
Hi Migi. All the queries run fine, which is what is puzzling me.

The queries run fine on their own, as does the continuous form, but when you put the two together it squeals. It's almost as if there is a problem with the linked fields, but on one table it is an autonumber field and on the other it is automatically passed across by the entry form subform on which Order Details are entered.
Feb 23 '12 #3
Mihail
759 512MB
Jay,
First of all review your tables. You loose some "LookUps" references.

Use the Object Dependencies tool (Ribbon -> Database Tools - Object Dependencies) to discover the problems.

I can't say if this will solve your problem but as long as something is wrong in your database, is a wasted time to look for an answer to your question.

After you make the necessary correction post again the database (if the report still not work).
Feb 23 '12 #4
JayF
45
Thanks Mihail. I looked through the dependencies and found one missing (tblCategories). This was indeed caused by a now redundant LookUp reference which was misnamed. I removed this lookup and retried the report to find that it returns exactly the same error.

All of the objects in this report's dependency tree are included in the sample.

I have reattached the database with the lookup removed.

Thanks again.
Attached Files
File Type: zip Test2.zip (64.9 KB, 113 views)
Feb 23 '12 #5
Mihail
759 512MB
I am almost sure that your problem is caused by use the same query as base for the main report and the sub-form (by the way: use a sub-report instead) because this approach create circular reference.

Create a new query for the details and base the sub_form to this query.
DO NOT refer query eqryInvoice in this new query.
Feb 23 '12 #6
Mihail
759 512MB
One more consideration:
So many fields in a single table make me sure that your database is far away from a normalized one.
So take a look here:
http://bytes.com/topic/access/insigh...cle+normalized
Feb 23 '12 #7
JayF
45
Thanks for the info Mihail. I'll have a play with different query configurations and see if I can fix it.


I was under the impression the data was pretty well organised in my DB. I read a similar article to your link before I started developing this DB and have just read the one you linked to. I still don't see how it could be further broken down.

Perhaps with the exception of [Courier] in tblOrders I can't see any other information which could be further split down. [Courier] will only ever contain a single datum (the Courier company's name}, thus splitting it down would surely be overkill?

The address field in tblOrders holds the postage address for that order only, and not necessarily the address in tblContacts. (A button on frmOrders sets the address to the address in tblContacts should it be the same, for usability.)

Using the example I attached, could you please provide me with some hints on how you think it could be improved?

Thanks again.
Feb 23 '12 #8
NeoPa
32,556 Expert Mod 16PB
JayF:
Using the example I attached, could you please provide me with some hints on how you think it could be improved?
Not here please. That would be going off the topic of the thread. A separate thread would be required for such a discussion. As it happens, I suspect Mihail saw general, rather than specific, indicators that the DB was not normalised. There may well not be any problems there, but I'll leave you to follow that up, should you be so inclined, in a new thread.

A tip for you here Jay. Typically, we don't like to encourage members to post their projects, without first being requested to do so by someone offering to look at it for them. There are various reasons for this, among which are :
  1. It often leads a member into the false assumption that explaining their problem adequately and clearly is not necessary. It is. An attached project is never a substitute for a properly explained situation.
  2. It certainly leads to more work for the experts to go through someone's project. Getting involved with a thread should not involve such gotchas for the experts, as we (all of us) don't want to discourage any experts from offering their time. That would be good for none of us.

I explain this to you as I'm sure you'll appreciate what I'm saying. Other comments from you lead me to believe you will understand.

For those occasions where it is necessary, or you've been asked to, the following instructions should minimise the extra effort involved - Before Posting (VBA or SQL) Code. The fact that you've already described it as stripped-down, indicates you probably already understand most of where I'm coming from, but going over it may still help.
Feb 24 '12 #9
JayF
45
Sure Neo. Understood.

The very nonspecific and unhelpful nature of the error I was getting, as well as very little information I could find online, led me to think that the only way of adequately illustrating it was with an example, which I attempted to make as simple as possible by stripping it down.

As it happens, Mihail's advice that it was related to some kind of circular reference (or similar) in the queries, appears to have been right. Thanks for your time, Mihail.
Feb 24 '12 #10
NeoPa
32,556 Expert Mod 16PB
I also understand and appreciate that some errors are just so hard to explain Jay. I'm happy that you understand the basic concept and only did it that way in extremis :-)

PS. I'm glad you got your solution, and well done to Mihail for finding it.
Feb 24 '12 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Starbuck | last post by:
OK, first let me say that I am no DB person. But I have a user here who keeps getting this error whenever she does, whatever it is she does, with databases... A google search takes me to...
3
by: Susie Swint | last post by:
I have the following IIf statement which worked in Access 95 but will not work in Access 2002. The error message I get is that the expression is typed incorrectly, or is too complex to be...
1
by: J | last post by:
Hi, Ive got 3 forms, (a subform within a subform within a form) and when I refresh the outermost form, Access closes and offers to send an error report. The forms worked fine a few weeks ago,...
3
by: ahaque38 | last post by:
Hello. Using A2K SP3, I am having the following problem with a report using "Sorting and Grouping". I have recently added a grouping in the reports for "Category2<>'CONTRACTS'". I have...
8
by: Matt | last post by:
Hi all, Thank you for taking the time. I have a database with 45 tables on it. 44 tables are linked to a main table through a one to one relationship. My question is, is there no way i can...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
1
by: wayniac | last post by:
I am having a problem when I try and remove several fields from the lookup. I have many fields, and the error I am getting is "Expression is too complex", is there anyway of going around this or...
5
by: Tony Toews [MVP] | last post by:
I'm very upset with Google's policy of indexing and allowing Google advertising on forum web sites which are "slurping" content from Usenet and Microsoft newsgroup servers. ...
1
cori25
by: cori25 | last post by:
Paycode': IIf(="01","Meeting",IIf(="02","Training",IIf(="04","Special Project",IIf(="05","QC",IIf(="06","MDU",IIf(="07","UG",IIf(="08","2nd Man",IIf(="09","Sr Tech Other",IIf(="10-1","Loan Out to...
1
by: janiecarter | last post by:
Hi all, I have a query called and I want to rank each customer grouped on the field and then by descending order on . I have found many solutions where I can use a subquery to do this eg: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.