Code Troubleshoot - Run Time Error 3270: Property Not Found

Hello Experts!

Could use your help on an error I'm receiving in running a query from a form.

The error is:
Run time error '3270':  Property not found

The code this error refers to is:
DoCmd.OpenQuery ("1114 - Form - Financial - CIS - Combine Adjust to Month - Cons")

This query is part of a chain of 2 previous queries.  When I replace the name above with the name of either of the previous queries, everything runs fine.

Is the name of the query too long?  Any advice?
thotovecAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

omgangIT ManagerCommented:
Easy to test if the name is too long.  Open the query in design view and then save it with a new name such as Test.  Then try you code with Test in place of the original query name.

The query is dependent on two other queries?  Can you describe the process?  Post the SQL for the query?

OM Gang

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jefftwilleyCommented:
do this

DoCmd.OpenQuery "[1114 - Form - Financial - CIS - Combine Adjust to Month - Cons]"
thotovecAuthor Commented:
The Process:
To obtain financial information (past, present, and future).
Use selects date ranges (Jan 07, Nov 06, etc), month or YTD, and data sets (actual, forecast, buget).
Query 1 filters data from a master table to select 12 months of data for the correct years and data set selected in the form.
Query 2 collapses the rows of data from Query 1 by removing null / zero rows.
Query 3 places a zero in the months not in the date range (if the the user selected April, a zero would be placed in Months May thru December, etc) from Query 2
Query 4 places a zero in the months not in the date range depending on the month or YTD selection (if the user selected April month, a zero would be placed in Months Jan thru March) from Query 3
Query 5 creates a new column summing all 12 months resulting in either the month or YTD data requested from Query 4.

Items I've validated:
The length of the name doesn't matter (shortened it, same issue).
Queries 1 & 2 work fine.
But there must be something in Query 3!

The SQL would be very long - don't know if you want to see it!
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

thotovecAuthor Commented:
I think I've been working too long on this project . . .

At the risk of opening myself to ridicule -

I wrote my "If" statement as "If" and not "IIf".

Thank you ladies and gentlemen, thank you very much - I'll be here all week . . .
omgangIT ManagerCommented:
Let us no iif ewe need any mor help.

just kidding!

OM Gang
Jim HornMicrosoft SQL Server Data DudeCommented:
http://www.mvps.org/access/general/gen0012.htm
As an aside, you really need to use a naming convention to better identify your queries and other objects.
The name 1114 - Form - Financial - CIS - Combine Adjust to Month - Cons  is just begging for typos.
Jim HornMicrosoft SQL Server Data DudeCommented:
Also, with your current name you need to delineate your query name with square brackets [ ] every time you refer to it in code because...
(1)  It begins with a non-letter
(2)  It has characters that are punctation marks (- and {space}) other than underscore.

Having to use square brackets is just one more thing to potentially forget and cause an error.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.