Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run time error too few paramters expected 1

Status
Not open for further replies.

macca007

Programmer
May 1, 2004
86
GB
Hi

i get this error when i run my application. Could any of u hav a look at this code and check if theres something wrong. I think the error is within the sql section.

strSQLContacts = "SELECT tblSupplierAddress.SupplierName, tblSupplierAddress.ContactName, tblSupplierAddress.Address1, tblSupplierAddress.Address2, tblSupplierAddress.Address3, tblSupplierAddress.City, tblSupplierAddress.PostalCode, tblSupplierAddress.County, tblSupplierAddress.Country, tblSupplierAddress.PhoneNumber, tblSupplierAddress.FaxNumber, tblSupplierAddress.EmailAddress, tblSupplierAddress.Web, tblSupplierAddress.Notes, tblSupplierAddress.SupplierIDAddress " & _
"FROM Suppliers RIGHT JOIN tblSupplierAddress ON Suppliers.SupplierID = tblSupplierAddress.SupplierIDAddress " & _
"WHERE (((tblSupplierAddress.SupplierIDAddress)=[forms]![frmStockSystem]![txtSupplierID]));"


Set db = CurrentDb()
Set rsContactCount = db.OpenRecordset(strSQLContacts)

rsContactCount.MoveLast
strTest = rsContactCount.RecordCount
MsgBox strTest

cheers

 
Replace this:
"WHERE (((tblSupplierAddress.SupplierIDAddress)=[forms]![frmStockSystem]![txtSupplierID]));"
By this:
"WHERE (((tblSupplierAddress.SupplierIDAddress)=" & [Forms]![frmStockSystem]![txtSupplierID] & "));"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top