[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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.

Posted on 2011-10-31
7
Medium Priority
?
291 Views
Last Modified: 2012-05-12
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...
=======
0
Comment
Question by:bob-hytekltd
6 Comments
 
LVL 15

Expert Comment

by:Eyal
ID: 37060790
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
 
LVL 13

Expert Comment

by:khairil
ID: 37060996
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
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 37064858
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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

Accepted Solution

by:
bob-hytekltd earned 0 total points
ID: 37091980
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
 
LVL 50

Expert Comment

by:Martin Liss
ID: 37230451
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
 

Author Comment

by:bob-hytekltd
ID: 37201522
Agree. Please close.
Thank you!
Bob Mroz
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Suggested Courses

831 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