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
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