Invalid bracketing of name error?

When trying to save the below query in Access the progam comes back and says:

Invalid bracketing of name 'SELECT DISTINCT(CALL_ID) FROM CCUSER_CALL_SUMMARY, CCADMIN_Agent_Shifts where (Call_begin between [Forms'.

Then it stops......maybe not enough space to complete the writing out of the error>

Anyhow the SQL we are trying to use is:

SELECT count (CALL_ID) AS ShiftCount
FROM [SELECT DISTINCT(CALL_ID)  FROM CCUSER_CALL_SUMMARY, CCADMIN_Agent_Shifts
WHERE (CALL_BEGIN Between [Forms]![Date Selection Form]![Date1] And [Forms]![Date Selection Form]![Date2] And
(MID(CCUSER_CALL_SUMMARY.CALL_BEGIN,9) BETWEEN CCADMIN_AGENT_SHIFTS.SHIFT_START AND CCADMIN_AGENT_SHIFTS.SHIFT_END) AND CCADMIN_Agent_shifts.shift =Reports![Call Detail Report]!txtShiftNum]. AS stalias;
MicroAutomationAsked:
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.

awking00Information Technology SpecialistCommented:
You need an open parenthesis and not a bracket after the from keyword and a closing parenthesis a the end of the query.
0
MicroAutomationAuthor Commented:
Can you copy and post with correct syntax?
0
LowfatspreadCommented:
try

SELECT count (CALL_ID) AS ShiftCount
FROM (SELECT DISTINCT(CALL_ID)  FROM CCUSER_CALL_SUMMARY, CCADMIN_Agent_Shifts
WHERE CALL_BEGIN Between [Forms]![Date Selection Form]![Date1] And [Forms]![Date Selection Form]![Date2]
 And MID(CCUSER_CALL_SUMMARY.CALL_BEGIN,9) BETWEEN CCADMIN_AGENT_SHIFTS.SHIFT_START AND CCADMIN_AGENT_SHIFTS.SHIFT_END
AND CCADMIN_Agent_shifts.shift =Reports![Call Detail Report]!txtShiftNum]) AS stalias;
0

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
awking00Information Technology SpecialistCommented:
Just what I said, change the bracket ("[") after the FROM keyword to an open parenthesis ("(") and add the closing parenthesis at the end of the query -
...!txtShiftNum]) AS stalias;
0
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
Query Syntax

From novice to tech pro — start learning today.