[Resolved] Please help me debug this SQL
Right I'm hoping someone will be able to help me I'm trying to get some text boxes to fill relative to what is in the drop down menu
To load the combobox with data I'm using the FillCombo code available on here.
this is what fills the combo on frmLoad
Code:
Call FillCombo(cboCustomerName, cn, "SELECT CustomerName, CustomerID FROM tblCustomers ORDER BY CustomerName", "CustomerName", "CustomerID")
Now i think the error is somewhere below, when you click on the drop down menu it errors
Code:
strSQL = "SELECT CustomerID, CustomerName " & "FROM tblCustomers " & "WHERE CustomerName = " & cboCustomerName.ItemData(cboCustomerName.ListIndex)
Basically I need to set the variable CuID (Customer ID) to the CustomerID of the name that you select in the drop down menu, with the current SQL I'm getting errors.
Re: Please help me debug this SQL (pretty urgent due to lack of time!)
Look like this
CustomerName
Should be
CustomerId
in the Where clause.
What is the actual error?
Re: Please help me debug this SQL (pretty urgent due to lack of time!)
Why on earth didn't I see that!
thank you fixed!