Query Too Complex...Sometimes

Hello, 

This seems to be one of those issues I feel like I am just missing.  I have a
report that runs off of a query.  When the report is called directly from the
report objects list, runs just fine.  

However, when the report is called using a button in a form, I get the
infamous "This expression is typed incorrectly, or it is too complex to be
evaluated..."

Any quick thoughts before I go through a long troubleshooting process?

Thanks!

B

-- 
Message posted via http://www.accessmonster.com

0
bhipwell
8/7/2007 8:12:37 PM
access.queries 6343 articles. 1 followers. Follow

3 Replies
455 Views

Similar Articles

[PageSpeed] 38

Why didn't you post the code so that we can help troubleshoot it?

On Aug 7, 4:12 pm, "bhipwell via AccessMonster.com" <u30281@uwe>
wrote:
> Hello,
>
> This seems to be one of those issues I feel like I am just missing.  I have a
> report that runs off of a query.  When the report is called directly from the
> report objects list, runs just fine.  
>
> However, when the report is called using a button in a form, I get the
> infamous "This expression is typed incorrectly, or it is too complex to be
> evaluated..."
>
> Any quick thoughts before I go through a long troubleshooting process?
>
> Thanks!
>
> B
>
> --
> Message posted viahttp://www.accessmonster.com


0
Jason
8/7/2007 8:28:16 PM
What is the code behind the button on the form? Should be something on the On 
Click event.
-- 
Jerry Whittle, Microsoft Access MVP 
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

"bhipwell via AccessMonster.com" wrote:

> Hello, 
> 
> This seems to be one of those issues I feel like I am just missing.  I have a
> report that runs off of a query.  When the report is called directly from the
> report objects list, runs just fine.  
> 
> However, when the report is called using a button in a form, I get the
> infamous "This expression is typed incorrectly, or it is too complex to be
> evaluated..."
> 
> Any quick thoughts before I go through a long troubleshooting process?
> 
> Thanks!
> 
> B
> 
> -- 
> Message posted via http://www.accessmonster.com
> 
> 
0
Utf
8/7/2007 8:32:06 PM
Figured it out.  The program sits on a separate server and is some work to
copy, paste, email, etc. to get it posted here.  Since it works in certain
circumstances, I thought there might be something I missed outside of the SQL.


Anyhow, it was the SUM issue that occurs when using the Select function
versus Group By.  After searching through dozens of threads and trying
numberous fixes, finally found the one that applied to me.  

Fixed and works fine now. 

Thanks!

B

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200708/1

0
bhipwell
8/8/2007 5:04:48 PM
Reply:

Similar Artilces:

New column in query
I have the following columns in my query empid, courseA, datecompA, courseB, datecompB, courseC, datecompC. What I need is an extra column that will have an indicator Yes if any of the 2 dates(i.e., datecompA, datecompB, datecompC) have dates, blank if all 3 dates have dates and No if only of the dates has a date. Based on your description of the fields you have in your query, it sounds like you are working from ... a spreadsheet! Is this a query based on a "linked table" (linked to an Excel spreadsheet)? If not, and if this is an Access table, your database would benefit ...

Update label and record query steps
Hi, I have a time consuming import code which has multiple steps. I amend the label caption to show which step the import is on but would like to show all steps and if possible place these steps in an archive table as the process is run by several users. At the moment I have: 1 - Preparing import...... which is replaced by 2 - Importing cust table 114,240 records (est. dur. 1 min)......... which is replaced by 3 - Importing sales table 842,600 records (est. dur. 4 mins)....... etc etc What I would like is: Query steps...... 18/02/2010 23:30:30 - Step 1 - Pre...

Fail to create IXSSO.Query object
I'm moving classic asp sites from Windows 2000 / IIS 5 to Windows 2008 R2 / IIS 7. * We have the "Indexing Service" started. * I have forced IIS to run application pool in 32 bit mode. * IXSSO.DLL is present in System32 directory. (dated 7/13/2009 it is from W2k8, I assume it is 64 bits) * Catalogs were created and looked OK. However, I am unable to create an ixsso.Query object. Get the following error message : Microsoft VBScript runtime error '800a01ad' ActiveX component can't create object /HC/ECO/Announcements/Headlines/SearchResul...

Query assistance 10-18-07
I have 2 tables and I am looking to create a query that will display the data only if it exists in both tables. I have been doing this in the past by running 2 unmatched queries, but I am assuming that there must be a faster, better way and I am hopeful that someone here could help. IF the data has to exist in both tables you could just join the tables on the relevant field(s). With an inner join the data would have to be in both tables to return any record. -- John Spencer Access MVP 2002-2005, 2007 Center for Health Program Development and Management University of Maryland Baltimore...

Offset Formula Query
I am using an offset formula to bring back data. I am trying to bring back the cell next to the one that has a label that matches the file name e.g. the file name is Place and then column a contains a list of places and column b contains text about those places. I am using the following formula: =OFFSET(Data!A15,MATCH(MID(CELL("filename"),SEARCH("[",CELL("filename"))+1, SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-5),Data!$A$15:Data!$A$37,0),1) Where Data! refers to the sheet which contains the data and t...

query the state of a global
Regarding win32 is, there some api to query the state of a global event(signal or non-signal)? I didn't find one in the MSDN. Regards Mark "Mark" <mark@intern.net> wrote in message news:OSiKcYmEIHA.5856@TK2MSFTNGP04.phx.gbl... > Regarding win32 is, there some api to query the state of a global > event(signal or non-signal)? > I didn't find one in the MSDN. > I couldn't find one either, but perhaps you could call WaitForSingleObject() with a timeout of 0, then check the return value to see if it returned WAIT_OBJECT_0 because the event was set...

DNS return queries through isa2000 for exchange
I recently stared having a problem where our email is being returned without delivery from comcast email servers. The return message is the following: <mail.XXXXXX.com #5.5.0 smtp;521-EHLO/HELO from sender ###.###.###.### does not map to mail.XXXXXX.com in DNS> (### is the ip address of the isa server) I'm guessing that they recently started requiring a matching DNS reply before accepting incoming email. I haven't changed anything on my end so that is why I assume the change came from them. My exchange server is on the inside (NATed) of the network. The IP address we have...

Query with two Tables with date filed for Date Range
How do I create a Query using two tables that have dates field to calculate a value using both the tables for a Date Range. For Example I have four TABLES- Time Card(TC), PROJECT, TC hours(HOURS), and TC expenses(EXPENSE). TC contains name of employees and their billing rates. PROJECT contains Name of Project. HOURS field are TCId, PROJECTId, Dateworked, and Hours. EXPENSE contains fields TCId, PROJECTId, Dateexpense, Expense. I want to build a query that over a Date Range that sums billable amount=hours worked* billing rate+ expense. I set the Dateworked >=[forms]![Report Date Range]![Be...

strMail Query!
I am wanting to enter tblOwnerInfo.LastName,"," TblOwnerInfo.FirstName with the tblOwnerInfo.Email (Address) to Sent Items to box? Is this Possible strMail = Nz(DLookup("Email", "tblOwnerInfo", "OwnerID = " & lngID), "") Public Function OwnerEmailAddress(idOwner As Long) As Variant If IsOwnerWithEmail(idOwner) Then OwnerEmailAddress = DLookup("[EMail]", "tblOwnerInfo", "[OwnerID]=" & idOwner) Else OwnerEmailAddress = Null End If End Function -- ...

Microsoft Query in Excel
I am trying to set up some queries in excel that reference an access database. Problem is that the location of the database and the name changes based on what project I am working on. What I guess I want to do is set up a query template and then change the location where those templates pull data from. The database objects will not change when copied, only the database name and location. Is this possible? Feel free to contact me with any questions. 518-464-1717 Thanks, Marc Bachand ...

Bar Graph Query
I am trying to create a bar graph with stacked data, however, I would like to have two bars right next to each other on the graph. For example, I want to have 2004 output stacked with two values, and a bar right next to it that has two values stacked which represent sales. Is this possible? Thanks Try one of these examples: http://peltiertech.com/Excel/ChartsHowTo/ClusterStack.html - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ acyakos wrote: > I am trying to create a bar graph with stac...

query Form 12-06-07
At work, we use a large database. In it, there are 400 records for personnel. The table this is based on has about 40 fields. Currently, whenever we need to print out a report with different queries, I need to make the query from scratch. Although not hard, I don't want to keep doing this as my boss thinks of new things. So what I would like to do is create one form. This form will have 10 drop down menus. The first drop down will be the field the query will sort by. After that, each option they choose will be a field the query will pull. For example: Command: Field5 Command: Fie...

Query for last transaction time?
Does anyone know of a query that will show the latest transaction time for Great Plains. I performed a restore of the Dynamics DB and need to confirm the latest transaction time. Thank you. --david ...

Joining queries in advanced find
Hi, We are having a major issue with one of our CRM customers. They are trying to do a mail merge via word but cannot get the data they required into a single view via advanced find in CRM. The reason for this is that you cannot seem to outer join 2 queries within an advanced find. We can see 2 ways to achieve what we need – could you or one of your colleagues advise on the solutions below: 1) How can we search 2 or more relationships, so that if a match is found in either, the result is returned? E.g. Entity A may be related to Entity B or Entity C, both of which are related to...

Unmatched Query 03-05-08
I have a query that I am trying to find out who did not submit a report during a particular time period. The unmatched works for all if I do not have the date filed in the query. Following is the SQL Statement with the date field. SELECT DmList.[DM Name], Communications.Date FROM DmList LEFT JOIN Communications ON DmList.[DM Name] = Communications.[District Mgr] WHERE (((Communications.[District Mgr]) Is Null) AND ((Communications.Date) Between [Start Date] And [End Date])); Any help would be appreciated. Richard Try this --- SELECT DmList.[DM Name], Communications.Date FROM DmList L...

Delete Query Help 05-11-10
I'm running a delete query that removes the records from table tblAllRecords when the PolNo is also found in a table called tblTransfer. When I run the query as a select query, it identifies 281 records to be deleted. When I run the query as a delete query, I get a messge box saying the query will delete 281 records from the table tblAllRecords, however after the query is run, I have 7,481 less records in my tblAllRecords!! I have never expereinced this before. What is happening? Any help you can give me is greatly appreciated. I'm running this query against my tblA...

Append Query help needed
I have a table that has several fields of data for gas wells. The data is normalized and each wells forecasts begin on the date of 1st production. Not all wells start on the same day but the new forecast will be the same for all the wells that exist and will be drilled this year. I know this is a easy thing to do but I have never done this before. I added a new field in my existing table called 2010_Forecast. I need to populate this field with the new forecast I have in Excel. There are 9,329 days of data that I will need to populate for every well in the database - the forecast...

Excel 2003 query from Access 2000 database
I have been using Excel 2003 workbook to query a database created in Access 2000 for several years. This is for tracking appraisal information, who has paid, who owes, and subcontractors that we owe for a given time frame. Recently, one of the spreadsheets within the workbook generates the following error, upon trying to refresh: "The query returned more data than will fit on a worksheet. To continue and display as much data as will fit, click OK. To cancel the query, click Cancel..." It had worked perfectly for years. I don't see a maximum number of entries in the query...

import access query (variable parameter)
Hi everyone. i recorded a macro using the query databse. I was able to get the info from the access query. But as i will need this information weekly i would have to change the dates of the macro every time. Is there a way to enter the starting and ending dates in 2 cells, and have the macro takeing this dates as the parameter to get the data? Here is part of the macro that i wrote (i think it's the part where the dates are defined). How do i have to change it? "General QGeneral" & Chr(13) & "" & Chr(10) & "WHERE (QGeneral.Date>={ts &#...

Queries to reduce a set of data pairs
I have a table of values which has the following fields: AreaElement, Joint, GlobalX, GlobalY, M_sd This list consists basically in a long list of M_sd values. Each AreaElement has 4 Joints, each one with GlobalX and GlobalY as it's coordinates along with a M_sd as it's value. Yet, although different AreaElements may share common Joints, all M_sd values are independent of each element. So, for a small example, consider the following sample: <sample> AreaElem Joint GlobalX GlobalY M_sd 1000 ~1044 6.32 11.91 12.17 1000 ~919 6.32 12.15 10.50 1000 ~1052 6.56 11....

Appended field in query
1. Can I make and appended field form 2 fields in a query (NOT A TABLE). The fields are mnemonic2 and mnemonic3 in qry_mnemonic based on an unchangable table PDM? or 2. Can I attach [Forms]![mnemonics]![combobox1] to each field in the query so I can do a partial lookup of both fields in this unbound combobox? I have tried this with no luck. I can only attach to one field and have it work. The form is a popup form attached to a report by a macro. I am a novice so please be specific. Carl if you're having trouble getting the query to work when you use the same form control as cr...

How to use colmn headings in paramter query
Sorry if this has been asked before, but I am not able to locate it if it has. But here is my delima: I need to be able to select the salesperson sales based on the month (1-12) from table 1. I* can create a parameter query, but am not sure hwo to query onlya certain month. table1 ID salesperson 1 2 3 4 5 6 7 8 9 10 11 12 1 joe 12 0 0 2 12 0 1 1 5 7 8 10 2 steve 2 5 6 18 0 0 2 3 4 11 12 1 select * from table1 where salesperson =joe and .... that is where I get stuck. I need to be able to select a column he...

Calculate difference in rows in a query
I have a query that calculates how much revenue is claimed by month per job but then I have to take the new month less the prior month. The problem is the data is in row format. I don't know how to subtract February from January, March from but don't know how. I know how to do it in Excel but not Access. Please help... Example: Order Month JTD Clm Variance 101026521 January $511,525 $0 101026521 February $511,525 $0 101029438 January $1,238 $0 101029438 February $3,713 $2,475 101033168 January $21,465 $0 101033168 February $51,460 $29,995 101034011 Janu...

DNS clients Does not query the secondary DNS
Hi, I have 2 w2003 Dcs - both DNS servers Primary and secondary. I have Clients running XP static Ip and in both DNS servers IP is configured as Primary and Secondary DNS. My Primary DNS server went down, all clients are not quering the secondary! using NSLOOKUP it showed that clients are still querying the primary with a tomeout error !! all name resoultiond stoped in the organization! any idea? tx NsLookup does not automatically fall through to alternate DNS servers, it is not a good way to test server redundancy. If you ping a host, which will use the DNS Cl...

Database Query #4
I have created a data table in a worksheet and named it “data”. Then I created a separate worksheet, in the same workbook, and created a database query of the data table, by using Data…Import External Data…New Database Query…Excel Files* and defining the database name by browsing to the same workbook. The query worked fine. However, when I moved the workbook (which included the data source) to a different folder and tried to refresh the database query, I got the following error message: “[Microsoft] [ODBC Excel Driver] The Microsoft Jet database engine could not find the object ‘data’...