I'm working in Visual Basic 6 with MS Access and trying to do an INNER JOIN on 3 tables and get a "too few parameters. Expect 1." error.

I'm working in Visual Basic 6 with MS Access and trying to do an INNER JOIN on 3 tables and get a "too few parameters. Expect 1." error.  

The SQL string is...

SELECT Qualifications.*, Roster.*, Arms.* FROM (Qualifications INNER JOIN Roster ON Qualifications.AgentID = Roster.ID) INNER JOIN Arms ON Qualifications.ArmID = Arms.ID WHERE (Qualifications.License = '050719100518') AND ( QualificationCourses.ID = 4 ) AND (Roster.Active = True) AND (Qualifications.QualDate BETWEEN #10/31/2000# AND #10/31/2011#) ORDER BY Qualifications.Course ASC, Roster.LName ASC, Roster.FName ASC, Qualifications.QualDate ASC

What's wwrong?

Thanks,
bob...
=======
bob-hytekltdAsked:
Who is Participating?
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.

EyalCommented:
try this...

SELECT Qualifications.*, Roster.*, Arms.* 
FROM Qualifications 
INNER JOIN Roster ON Qualifications.AgentID = Roster.ID
INNER JOIN Arms ON Qualifications.ArmID = Arms.ID 
WHERE (Qualifications.License = '050719100518') AND ( QualificationCourses.ID = 4 ) AND (Roster.Active = True) AND (Qualifications.QualDate BETWEEN #10/31/2000# AND #10/31/2011#) 
ORDER BY Qualifications.Course ASC, Roster.LName ASC, Roster.FName ASC, Qualifications.QualDate ASC

Open in new window

0
khairilCommented:
Hi,

Access will threat any UNKNOWN or MISSPELLED column as parameter, you should check the query thoroughly. Make sure you check EVERY column exist in the appropriate table.

You can also test the query directly from the Access file. Open the Access file, create new query and paste the query you post here into the query windows and run it. You should notice if error exist when running that query.
0
Arthur_WoodCommented:
look at this partial statement:

AND ( QualificationCourses.ID = 4 ) AND (Roster.Active = True)

you have not defined the table QualificationCourses anywhere in the query. Iis that the name of your tables?)

AW
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

bob-hytekltdAuthor Commented:
The actual solution came from hnasr...
Posted on 08/19/10 at 11:36 PM
Called "INNER JOIN a Number Of Tables".
I did a search of the existing forums and found exactly what I needed.
Thanks all!

bob...
=======
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
Martin LissOlder than dirtCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
bob-hytekltdAuthor Commented:
Agree. Please close.
Thank you!
Bob Mroz
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
Microsoft Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.