Link to home
Start Free TrialLog in
Avatar of melinhomes
melinhomes

asked on

Access Query

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?
Avatar of PatHartman
PatHartman
Flag of United States of America image

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.
Avatar of melinhomes
melinhomes

ASKER

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...
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
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial