Skip to first unread message

Ray Pearson

May 21, 2021, 7:59:16 PMMay 21
I have used the sql statement in Access 97 but now I am using 2016 and I keep getting the old "not enough parameters". I have check everything and all seems well. can anyone throw any light on the problem. I'm new to SQL

TIA - Ray

strSql = "SELECT FarNorth.JPID, FarNorth.FirstName, FarNorth.Surname, FarNorth.Email, FarNorth.Status, Sub2.SubID, Sub2.Year, Sub2.AmountPaid" & _
"FROM FarNorth INNER JOIN Sub2 ON FarNorth.JPID = Sub2.SubID " & _
"WHERE (((FarNorth.Status)='Active') AND ((Sub2.Year)=2022) AND ((Sub2.AmountPaid) Is Null) AND ((Len([FarNorth].[Email]))>0));"

Ron Weiner

May 21, 2021, 9:33:44 PMMay 21
Ray Pearson presented the following explanation :
I do not see anything obviously wrong with the Sql you have listed, but
we cannot see what columns are in the tables FarNorth and Sub2.
Presumbly :
FarNotrh.Status is a Text type
Sub2.Year is a number
Sub2AmountPaid does not have a Default Value and
FarNorth.Email is also a text type.

I'd reccomend you taking the Sql and Paste it into the Sql view of a
new query, and see if Access gives you a hint as to where the problem
might be.

Ron W

Ray Pearson

May 29, 2021, 7:26:19 PMMay 29
Thank you Ron.....I followed-up on your advice to enter the sql in to a query and presto the error was staring me in the face. Thanks again - Ray
Reply all
Reply to author
0 new messages