Solved

ACCESS ERROR "..OR IS TOO COMPLEX TO BE EVALUATED..."

Posted on 2011-09-09
5
274 Views
Last Modified: 2012-08-14
I have inherited a couple of databases over here in Warranty and one of them has a minor bug that I can’t seem to find. I have a drop down box on a form, that runs a simple query from a single table, and when we select drop down for August 2011 it will not finish running the query ?  It gives this error message ; again all we do is select the month in the drop down ? I have looked at all data in table see nothing weird or corrupt in the  data and it will pull all other months just fine ??? any advice??  Here is the Qry statement;

SELECT Format$(Resolution_Result_tbl.Date_of_Record,'mmmm yyyy') AS [Month]
FROM Resolution_Result_tbl
GROUP BY Format$(Resolution_Result_tbl.Date_of_Record,'mmmm yyyy'), Format$(Resolution_Result_tbl.Date_of_Record,'mm')
ORDER BY Format$(Resolution_Result_tbl.Date_of_Record,'mm') DESC;
0
Comment
Question by:castlerj
  • 3
5 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 36512033
are there any codes running in the Afterupdate event of the combo box?

create a new query and paste this

SELECT Format(Resolution_Result_tbl.Date_of_Record,'mmmm yyyy') AS [Month]
FROM Resolution_Result_tbl
GROUP BY Format$(Resolution_Result_tbl.Date_of_Record,'mmmm yyyy'), Format(Resolution_Result_tbl.Date_of_Record,'mm')
ORDER BY Format(Resolution_Result_tbl.Date_of_Record,'mm') DESC;

see if the query returns result
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 400 total points
ID: 36512042
are there any Null values in field "Date_of_Record" ?
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 36512078
can you create a new form, place a combo box and set the row source to

SELECT Format(Resolution_Result_tbl.Date_of_Record,'mmmm yyyy') AS [Month]
FROM Resolution_Result_tbl
GROUP BY Format$(Resolution_Result_tbl.Date_of_Record,'mmmm yyyy'), Format(Resolution_Result_tbl.Date_of_Record,'mm')
ORDER BY Format(Resolution_Result_tbl.Date_of_Record,'mm') DESC;


post how it goes..
0
 
LVL 26

Assisted Solution

by:Nick67
Nick67 earned 100 total points
ID: 36512164
Going sideways as it were...
Why have the query doing all this conversion, grouping and ordering?
Is it just returning a list of possible months and years?

The query could then be

SELECT DISTINCT Format(Resolution_Result_tbl.Date_of_Record,'mmmm yyyy') AS [Month]
FROM Resolution_Result_tbl WHERE Format(Resolution_Result_tbl.Date_of_Record,'mmmm yyyy')  is not null
ORDER BY Format(Resolution_Result_tbl.Date_of_Record,'mmmm yyyy') DESC;

That'll get you months and years in decending order, and handle any nulls
0
 

Author Closing Comment

by:castlerj
ID: 36512799
I adjsuted the query to capicorn1's suggestion and all is working fine.  I will also try Nick67 too.  Thanks for the help!
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question