?
Solved

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

Posted on 2011-09-09
5
Medium Priority
?
278 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1600 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 400 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
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…
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 …
Suggested Courses

762 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