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
Now i think the error is somewhere below, when you click on the drop down menu it errorsCode:Call FillCombo(cboCustomerName, cn, "SELECT CustomerName, CustomerID FROM tblCustomers ORDER BY CustomerName", "CustomerName", "CustomerID")
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.Code:strSQL = "SELECT CustomerID, CustomerName " & "FROM tblCustomers " & "WHERE CustomerName = " & cboCustomerName.ItemData(cboCustomerName.ListIndex)




Reply With Quote