Solved

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

Posted on 2011-09-09
5
275 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

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.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

713 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