bob-hytekltd
asked on
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...
=======
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...
=======
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.
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.
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
ASKER
Agree. Please close.
Thank you!
Bob Mroz
Thank you!
Bob Mroz
Open in new window