Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access Query

Posted on 2016-10-13
4
Medium Priority
?
73 Views
Last Modified: 2016-10-27
I have a macro running a series of queries. I keep getting the following error:
"This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables."
I'm basically running reports for different projects. I select the project name from a combo, then I hit a command button (initiates a macro) to generate the results based on that project. It has worked for a number of projects, but when I select certain projects it doesn't work. There are no special characters in the project names either.
Not sure what would be causing this?
0
Comment
Question by:melinhomes
[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
  • 2
4 Comments
 
LVL 39

Expert Comment

by:PatHartman
ID: 41842124
If it works for some projects but not others, it is most likely a data issue.  You will need to run the steps of the macro one at a time to isolate the problem.  I'm not sure we will be able to resolve this without the actual database and since you shouldn't load private data to this site, we'll just hold your hand as you work through this.
0
 

Author Comment

by:melinhomes
ID: 41842142
1, qryAccreditedTrainingOnProject, ExcelWorkbook(*.xlsx), \\mfile2\Sustainabilty Team\Sustainability Tool\MelinCommunityBenefitsTool2\ValueWales\Training\AccreditedTrainingOnProject.xlsx, No, \\mfile2\Sustainabilty Team\Sustainability Tool\MelinCommunityBenefitsTool2\ValueWales\Training\AccreditedTrainingOnProject.xlsx, , 0

Above is the message, I assume its the query? (tables are sql tables). If I remove this column from the query, it seems to run? Yet it worked on others!!!

Start Date
Between [tblProjectTeam]![StartDate] And Now()

Think this is what is causing it...
0
 

Author Comment

by:melinhomes
ID: 41842165
Hi Pat

Thanks for this, I will check the data in the underlying tables tomorrow and let you know how I get on. If that doesn't work, ill run the queries one by one.

Thanks
Gareth
0
 
LVL 52

Accepted Solution

by:
Gustav Brock earned 2000 total points
ID: 41842525
In the query (go to design), specify as Parameter:  

    [tblProjectTeam]![StartDate]  

and select Date/time as data type.

/gustav
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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 …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

636 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